From 820851e1450d0fb954af9f3d97ad9442b718decc Mon Sep 17 00:00:00 2001 From: Siina Mashek Date: Wed, 1 Jul 2020 10:43:10 +0300 Subject: [PATCH] cleaned up linking, added file loop --- link.sh | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/link.sh b/link.sh index 4173379..a220770 100755 --- a/link.sh +++ b/link.sh @@ -1,9 +1,12 @@ #!/bin/sh -folders=($(ls ${PWD}/config)) +folders=($(ls $PWD/config)) +files=("Xresources" "bashrc") for folder in "${folders[@]}"; do - ln -sf ${PWD}/config/${folder} ${HOME}/.config/ + ln -sf $PWD/config/$folder $HOME/.config/ done -ln -sf ${PWD}/Xresources ${HOME}/.Xresources +for file in "${files[@]}"; do + ln -sf $PWD/$file $HOME/.$file +done