From 8bf58e73345131e406241a09d6eca316183b1ed8 Mon Sep 17 00:00:00 2001 From: Jonas Gunz Date: Thu, 26 Mar 2020 23:18:32 +0100 Subject: fix install --- install.sh | 27 +++++---------------------- 1 file 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 -- cgit v1.2.3