From 8e4ccf49f3a460faaa25dd3df338565bc3242f3c Mon Sep 17 00:00:00 2001 From: Sami Samhuri Date: Fri, 20 Aug 2010 13:31:45 -0700 Subject: [PATCH] Only link configs if they don't already exist --- init.sh | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/init.sh b/init.sh index aa38468..e055a1d 100755 --- a/init.sh +++ b/init.sh @@ -8,8 +8,8 @@ else CONFIG_PATH="${HOME}/config" fi -ln -s "${CONFIG_PATH}/emacs" ".emacs" -ln -s "${CONFIG_PATH}/emacs.d" ".emacs.d" -ln -s "${CONFIG_PATH}/screenrc" ".screenrc" -ln -s "${CONFIG_PATH}/vimrc" ".vimrc" -ln -s "${CONFIG_PATH}/zshenv" ".zshenv" +[ -e ".emacs" ] || ln -s "${CONFIG_PATH}/emacs" ".emacs" +[ -e ".emacs.d" ] || ln -s "${CONFIG_PATH}/emacs.d" ".emacs.d" +[ -e ".screenrc" ] || ln -s "${CONFIG_PATH}/screenrc" ".screenrc" +[ -e ".vimrc" ] || ln -s "${CONFIG_PATH}/vimrc" ".vimrc" +[ -e ".zshenv" ] || ln -s "${CONFIG_PATH}/zshenv" ".zshenv"