From: Ralph Ronnquist Date: Sat, 26 Mar 2022 23:07:37 +0000 (+1100) Subject: added single quotes around config values X-Git-Tag: deb_0.1~3 X-Git-Url: https://git.rrq.au/?a=commitdiff_plain;h=0bf330dc574e3eae8e5fec15e6d09bffa1597056;p=rrq%2Foverlay-boot.git added single quotes around config values --- diff --git a/functions b/functions index ab20d20..67ea3ad 100644 --- 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'"