added single quotes around config values
authorRalph Ronnquist <ralph.ronnquist@gmail.com>
Sat, 26 Mar 2022 23:07:37 +0000 (10:07 +1100)
committerRalph Ronnquist <ralph.ronnquist@gmail.com>
Sat, 26 Mar 2022 23:07:37 +0000 (10:07 +1100)
functions

index ab20d20ace23d5c7f3e265f4cf7d1d469479dd7b..67ea3ad51b143476c0ba5f3a82bfaa52d438c4ee 100644 (file)
--- a/functions
+++ b/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'"