make-wrapper.sh: add an --unset argument

`--set FOO ""` is not strictly equivalent to `--unset FOO`. In the former case
the environment variable still exists with an empty string as a value.
This commit is contained in:
zimbatm 2016-02-28 13:27:43 +00:00
parent ad47355786
commit 5e5494a852

View File

@ -19,6 +19,12 @@ makeWrapper() {
echo "export $varName=$value" >> $wrapper
fi
if test "$p" = "--unset"; then
varName=${params[$((n + 1))]}
n=$((n + 1))
echo "unset $varName" >> "$wrapper"
fi
if test "$p" = "--run"; then
command=${params[$((n + 1))]}
n=$((n + 1))