Giving another approach a shot

This commit is contained in:
Ben Kreeger 2023-06-28 12:03:29 -05:00 committed by GitHub
parent 176987185a
commit 8516419dbc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -12,9 +12,12 @@ fi
# Link dotfiles.
declare -a dotfiles=("gemrc" "gitconfig" "gitignore.global")
SCRIPT=$(readlink -f "$0")
SCRIPTPATH=$(dirname "$SCRIPT")
for file in "${dotfiles[@]}"
do
if [[ ! -a "$HOME/.$file" ]]; then
ln -sfv .$file $HOME/.$file
ln -sfv $SCRIPTPATH/.$file $HOME/.$file
fi
done