#!/usr/bin/env bash CURRENT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" source "$CURRENT_DIR/../variables.sh" template() { local tmux_start_script="$1" local content read -r -d '' content <<-EOF Label ${osx_auto_start_file_name} ProgramArguments ${tmux_start_script} RunAtLoad EOF echo "$content" } main() { local launchd_plist_file_content="$(template "$CURRENT_DIR/osx_terminal_start_tmux.sh")" echo "$launchd_plist_file_content" > "$osx_auto_start_file_path" } main