diff options
author | Jonas Gunz <himself@jonasgunz.de> | 2020-02-26 18:12:15 +0100 |
---|---|---|
committer | Jonas Gunz <himself@jonasgunz.de> | 2020-02-26 18:12:15 +0100 |
commit | 729ebefcef013564a05e52679a3ab57e0690f15f (patch) | |
tree | 7f639472e868a1b7090981932700f2a8f71bdd90 | |
parent | 08f28902a97a359cfd2c3df74443ae0e28fd59cd (diff) | |
download | dotfiles-729ebefcef013564a05e52679a3ab57e0690f15f.tar.gz |
updated install script
-rwxr-xr-x | install.sh | 21 |
1 files changed, 11 insertions, 10 deletions
@@ -1,4 +1,4 @@ -#!/bin/bash +#!/bin/bash #Configs for home dir CFGS=(.i3 .vim .xinitrc .compton.conf .bashrc .Xresources .radare2rc .bash_profile) @@ -22,9 +22,9 @@ yes_no() selector() { local cnt=0 - for i in "$@" + for selection in "$@" do - echo "$cnt) $i" + echo "$cnt) $selection" ((cnt=$cnt + 1)) done @@ -73,18 +73,19 @@ then selector "~" "~/.config" "Custom location" "Abort" case $? in 0) - echo "~" - break;; + export INSTPATH="$HOME";; 1) - echo .config - break;; + export INSTPATH="$HOME/.config";; 2) echo custom - break;; + continue;; *) echo Abort. - break;; + continue;; esac + echo aaa $INSTPATH/$i + link $(pwd)/$i $INSTPATH/$(basename $i) + unset INSTPATH else echo $i does not exist. Skipping. fi @@ -118,6 +119,6 @@ done #.files is used to tell scripts where to look for the dotfiles if yes_no "Generate '.files'?"; then - echo "DOTFILEBASE=\"$(pwd)\"" > $HOME/.files + echo "DOTFILEBASE=\"$WORKDIR\"" > $HOME/.files fi |