diff options
author | Jonas Gunz <himself@jonasgunz.de> | 2020-03-26 23:18:32 +0100 |
---|---|---|
committer | Jonas Gunz <himself@jonasgunz.de> | 2020-03-26 23:18:32 +0100 |
commit | 8bf58e73345131e406241a09d6eca316183b1ed8 (patch) | |
tree | a3ee820230dff3c194853d09ae1610a565c8e3b2 /install.sh | |
parent | a6c197569a35b023cb1d681deb3a22fbde82048e (diff) | |
download | dotfiles-8bf58e73345131e406241a09d6eca316183b1ed8.tar.gz |
fix install
Diffstat (limited to 'install.sh')
-rwxr-xr-x | install.sh | 27 |
1 files changed, 5 insertions, 22 deletions
@@ -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 |