aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Jonas Gunz <himself@jonasgunz.de> 2020-02-26 18:12:15 +0100
committerGravatar Jonas Gunz <himself@jonasgunz.de> 2020-02-26 18:12:15 +0100
commit729ebefcef013564a05e52679a3ab57e0690f15f (patch)
tree7f639472e868a1b7090981932700f2a8f71bdd90
parent08f28902a97a359cfd2c3df74443ae0e28fd59cd (diff)
downloaddotfiles-729ebefcef013564a05e52679a3ab57e0690f15f.tar.gz
updated install script
-rwxr-xr-xinstall.sh21
1 files changed, 11 insertions, 10 deletions
diff --git a/install.sh b/install.sh
index 109e7c5..7b537c1 100755
--- a/install.sh
+++ b/install.sh
@@ -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