From 56bcf61245de64ff693c1cd05a5a3fc5430a9538 Mon Sep 17 00:00:00 2001 From: johannst Date: Mon, 1 May 2017 23:11:39 +0200 Subject: Changed tmux.conf installer to handle existing ~/.tmux.conf files if existent --- install | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/install b/install index e9b9427..6c56295 100755 --- a/install +++ b/install @@ -78,11 +78,17 @@ function gitConfigInstaller() { } #}}} -#{{{ tmuxConfigInstaller +#{{{ tmuxConfigInstaller function tmuxConfigInstaller() { local tmuxconf=~/.tmux.conf - ln -s $ABS_BASE_DIR/tmux.conf $tmuxconf + touch $tmuxconf + grep $gMagicNumber $tmuxconf > /dev/null 2>&1 + if [[ $? = 0 ]]; then + return 1 + fi + echo -e "\n# $gMagicNumber - Auto generated, do not delete or modify!" >> $tmuxconf + echo -e "source-file $ABS_BASE_DIR/tmux.conf" >> $tmuxconf return 0 } -- cgit v1.2.3