Browse Source

added single quotes around config values

master
Ralph Rönnquist 1 year ago
parent
commit
0bf330dc57
  1. 2
      functions

2
functions

@ -8,7 +8,7 @@ die() {
# grab and set a configuration variable
# $1 = variable, [ $2 = default .. error otherwise ]
config() {
eval $1="$(sed "/^$1=.*/{s|^$1=||;b};d" $CONFIG)"
eval $1="'$(sed "/^$1=.*/{s|^$1=||;b};d" $CONFIG)'"
[ -z "$(eval echo "\$$1")" ] || return 0
[ $# -lt 2 ] && die "Missing $1=... in $CONFIG"
eval $1="'$2'"

Loading…
Cancel
Save