$a is a literal sed command, avoid shell var expansion.

This commit is contained in:
Oliver Jowett 2016-01-25 15:22:53 +00:00
parent f9aa0398e5
commit c510adbc94

View file

@ -31,7 +31,7 @@ subvar_raw() {
if ! grep -Eq "^ *$2=" $SRCCONFIGFILE; then
# if not present in the config file, add it at the end
echo "$a $2=$1" >> $SEDSCRIPT
echo "\$a $2=$1" >> $SEDSCRIPT
else
# otherwise, replace the current value
echo "s@^ *$2=.*@$2=\"$1\"@" >>$SEDSCRIPT