From: John A. Barbuto Date: Sat, 5 Apr 2014 22:28:27 +0000 (-0700) Subject: Use relative symlinks during installation X-Git-Url: https://source.supwisdom.com/gerrit/gitweb?a=commitdiff_plain;h=10bda0c11123cc2be8b4383a717052363dd6273e;p=common%2Fbash_it.git 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. --- 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])