summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Jonas Gunz <himself@jonasgunz.de> 2020-03-26 23:18:32 +0100
committerGravatar Jonas Gunz <himself@jonasgunz.de> 2020-03-26 23:18:32 +0100
commit8bf58e73345131e406241a09d6eca316183b1ed8 (patch)
treea3ee820230dff3c194853d09ae1610a565c8e3b2
parenta6c197569a35b023cb1d681deb3a22fbde82048e (diff)
downloaddotfiles-8bf58e73345131e406241a09d6eca316183b1ed8.tar.gz
fix install
-rwxr-xr-xinstall.sh27
1 files changed, 5 insertions, 22 deletions
diff --git a/install.sh b/install.sh
index be34753..b197912 100755
--- a/install.sh
+++ b/install.sh
@@ -113,29 +113,12 @@ if [ $# -gt 0 ]
then
for i in "$@"
do
- echo "Install $i to"
- if [ -e $i ]
- then
- selector "~" "~/.config" "Custom location" "Abort"
- case $? in
- 0)
- export INSTPATH="$HOME";;
- 1)
- export INSTPATH="$HOME/.config";;
- 2)
- echo custom
- continue;;
- *)
- echo Abort.
- continue;;
- esac
- echo aaa $INSTPATH/$i
- link $(pwd)/$i $INSTPATH/$(basename $i)
- unset INSTPATH
+ if [ ! -z ${CONFIGS[$i]} ]; then
+ echo "Install $(pwd)/$i to $HOME/${CONFIGS[$i]}/$i"
+ link "$(pwd)/$i" "$HOME/${CONFIGS[$i]}/$i"
else
- echo $i does not exist. Skipping.
+ echo $i Not found. Skipping.
fi
-
done
exit 0
fi
@@ -151,7 +134,7 @@ git submodule update
selected=( $(multiselector ${!CONFIGS[@]}) )
for cnf in "${selected[@]}"; do
- echo "$(pwd)/$cnf $HOME/${CONFIGS[$cnf]}/$cnf"
+ echo "Install $(pwd)/$cnf to $HOME/${CONFIGS[$cnf]}/$cnf"
link "$(pwd)/$cnf" "$HOME/${CONFIGS[$cnf]}/$cnf"
done