Skip to content

Commit 0698e8f

Browse files
authored
Merge pull request #132 from rmartine-ias/osx-added-plist
Only add macOS .plist file if contents have changed
2 parents 3e4bc35 + e8be48e commit 0698e8f

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

scripts/handle_tmux_automatic_start/osx_enable.sh

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,8 @@ main() {
6565
local tmux_start_script_path="${CURRENT_DIR}/osx_${strategy}_start_tmux.sh"
6666

6767
local launchd_plist_file_content="$(template "$tmux_start_script_path" "$fullscreen_option_value")"
68-
echo "$launchd_plist_file_content" > "$osx_auto_start_file_path"
68+
if ! diff "$osx_auto_start_file_path" <(echo "$launchd_plist_file_content") &>/dev/null ; then
69+
echo "$launchd_plist_file_content" > "$osx_auto_start_file_path"
70+
fi
6971
}
7072
main

0 commit comments

Comments
 (0)