From 16943a9429ee4cdfe4bf2e219fff31d3dadda595 Mon Sep 17 00:00:00 2001 From: pt Date: Mon, 4 May 2020 13:50:15 -0400 Subject: [PATCH] change directory name, remove print messages, delete symlinks before re-adding --- setup.sh | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/setup.sh b/setup.sh index 0d21d81..b6dd967 100755 --- a/setup.sh +++ b/setup.sh @@ -3,8 +3,8 @@ #-------------------------------------------------------setup folder pointers and target files------------------------------------------------------------- -dir=~/linux_user_setup -backup=~/linux_user_setup_restore +dir=~/dot_config +backup=~/dot_config_backup files=".bashrc .vimrc .tmux.conf .psqlrc" #------------------------------------------------ create the resore directory if it doesn't already exist-------------------------------------------------- @@ -21,14 +21,13 @@ do #if the file is not a symlink the just _move_ it, otherwise _copy_ the linked file if [ ! -L $file ]; then - echo "moving $file to $backup" mv ~/$file $backup - echo "snapping $file to be a new symlink to version controlled file in $dir" - ln -s $dir/$file ~/$file else # if the target file is a symlink, copy the linked file cp $(readlink -f $file) $backup + rm $file fi + ln -s $dir/$file ~/$file done #----------------------------------------------------------see if Vundle has been cloned yet and do so-----------------------------------------------------