aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Jonas Gunz <himself@jonasgunz.de> 2021-08-28 15:41:57 +0200
committerGravatar Jonas Gunz <himself@jonasgunz.de> 2021-08-28 15:41:57 +0200
commit8a63b845cb8c7bad955a4eea762a3f95003e8a97 (patch)
tree24727a0d87aeeaea69ad6f187f082bd15ce90934
parentf7422dc4209372c092783d9ba58fe1c56923237f (diff)
downloaddotfiles-8a63b845cb8c7bad955a4eea762a3f95003e8a97.tar.gz
install.sh
-rwxr-xr-xinstall.sh12
1 files changed, 6 insertions, 6 deletions
diff --git a/install.sh b/install.sh
index af49f6c..e7b5a92 100755
--- a/install.sh
+++ b/install.sh
@@ -44,13 +44,13 @@ yes_no() {
#interface on sterr
multiselector() {
local argc=$#
- local argv=($@)
+ local argv=( "$@" )
local cnt=0
local ret=""
for entry in "$@"; do
>&2 echo "$cnt) $entry"
- ((cnt=$cnt + 1))
+ ((cnt=cnt + 1))
done
>&2 echo "Select entry(s)"
@@ -154,11 +154,11 @@ then
fi
WORKDIR=$(realpath $(dirname $0))
-cd $WORKDIR
-echo Working in $WORKDIR
-echo Homedir is $HOME
+cd "$WORKDIR" || (echo cd failed; exit 1)
+echo "Working in $WORKDIR"
+echo "Homedir is $HOME"
-selected=( $(multiselector ${!CONFIGS[@]} ${!SETS[@]}) )
+selected=( $(multiselector "${!CONFIGS[@]}" "${!SETS[@]}" ) )
for cnf in "${selected[@]}"; do
choose_target "$cnf"