From 10bda0c11123cc2be8b4383a717052363dd6273e Mon Sep 17 00:00:00 2001 From: "John A. Barbuto" Date: Sat, 5 Apr 2014 15:28:27 -0700 Subject: [PATCH] Use relative symlinks during installation When using dotfiles synced between different machines, this allows enabled aliases, completions, and plugins to work with varying home directories. --- install.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/install.sh b/install.sh index 46edcf2..4c0bf08 100755 --- a/install.sh +++ b/install.sh @@ -36,7 +36,7 @@ function load_all() { [ ${filename:0:1} = "_" ] && continue dest="${BASH_IT}/${file_type}/enabled/${filename}" if [ ! -e "${dest}" ]; then - ln -s "${src}" "${dest}" + ln -s "../available/${filename}" "${dest}" else echo "File ${dest} exists, skipping" fi @@ -57,7 +57,7 @@ function load_some() { read -p "Would you like to enable the ${file_name%%.*} $file_type? [Y/N] " RESP case $RESP in [yY]) - ln -s "$path" "$BASH_IT/$file_type/enabled" + ln -s "../available/${file_name}" "$BASH_IT/$file_type/enabled" break ;; [nN]) -- 2.17.1