From 3d6fac266488d121269134a8a5485ece6c29ba26 Mon Sep 17 00:00:00 2001 From: Christian Colglazier Date: Mon, 23 Dec 2019 10:50:44 -0500 Subject: [PATCH] Linking directories --- scripts/install.sh | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/scripts/install.sh b/scripts/install.sh index 4f4bd32..4327783 100644 --- a/scripts/install.sh +++ b/scripts/install.sh @@ -4,11 +4,12 @@ dotdir=~/dotfiles # src dest sudo files=($dotdir/.zshrc ~/ 'n' \ - ${dotdir}/alacritty/alacritty.yml ~/.config/alacritty/ 'n') + ${dotdir}/alacritty/alacritty.yml ~/.config/alacritty/ 'n' + ${dotdir}/g13 ~/.config/ 'n') echo Setting up dotfiles... -# +# Loop through config files for (( i=0; i<${#files[@]} ; i+=3 )) ; do # Check if sudo is needed pre='' @@ -19,11 +20,12 @@ for (( i=0; i<${#files[@]} ; i+=3 )) ; do destPath=${files[i+1]}$(basename "${files[i]}") # Check if file already exists - if [ -f $destPath ]; then + if [ -e $destPath ]; then # Check if path is not a sybolic link if ! [ -L $destPath ]; then echo Backing up $destPath $pre mv $destPath ${destPath}.bak + # File already set up else echo The file $destPath is already set up continue