Compare commits

..

2 Commits

View File

@ -3,8 +3,8 @@
#-------------------------------------------------------setup folder pointers and target files------------------------------------------------------------- #-------------------------------------------------------setup folder pointers and target files-------------------------------------------------------------
dir=~/linux_user_setup dir=~/dot_config
backup=~/linux_user_setup_restore backup=~/dot_config_backup
files=".bashrc .vimrc .tmux.conf .psqlrc" files=".bashrc .vimrc .tmux.conf .psqlrc"
#------------------------------------------------ create the resore directory if it doesn't already exist-------------------------------------------------- #------------------------------------------------ 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 the file is not a symlink the just _move_ it, otherwise _copy_ the linked file
if [ ! -L $file ]; if [ ! -L $file ];
then then
echo "moving $file to $backup"
mv ~/$file $backup mv ~/$file $backup
echo "snapping $file to be a new symlink to version controlled file in $dir"
ln -s $dir/$file ~/$file
else else
# if the target file is a symlink, copy the linked file # if the target file is a symlink, copy the linked file
cp $(readlink -f $file) $backup cp $(readlink -f $file) $backup
rm $file
fi fi
ln -s $dir/$file ~/$file
done done
#----------------------------------------------------------see if Vundle has been cloned yet and do so----------------------------------------------------- #----------------------------------------------------------see if Vundle has been cloned yet and do so-----------------------------------------------------