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.
wip/yesman
zimbatm 8 years ago
parent ad47355786
commit 5e5494a852
  1. 6
      pkgs/build-support/setup-hooks/make-wrapper.sh

@ -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))

Loading…
Cancel
Save