587713944a
GitOrigin-RevId: 6143fc5eeb9c4f00163267708e26191d1e918932
29 lines
663 B
Bash
29 lines
663 B
Bash
#!@shell@
|
|
|
|
defaultSysroot=(@sysroot@)
|
|
|
|
for arg; do
|
|
case "$arg" in
|
|
--sysroot|--sysroot=*)
|
|
defaultSysroot=()
|
|
;;
|
|
--)
|
|
break
|
|
;;
|
|
esac
|
|
done
|
|
|
|
extraBefore=(@defaultArgs@ "${defaultSysroot[@]}")
|
|
extraAfter=($@extraFlagsVar@)
|
|
|
|
# Optionally print debug info.
|
|
if (( "${NIX_DEBUG:-0}" >= 1 )); then
|
|
echo "extra flags before to @prog@:" >&2
|
|
printf " %q\n" "${extraBefore[@]}" >&2
|
|
echo "original flags to @prog@:" >&2
|
|
printf " %q\n" "$@" >&2
|
|
echo "extra flags after to @prog@:" >&2
|
|
printf " %q\n" "${extraAfter[@]}" >&2
|
|
fi
|
|
|
|
exec @prog@ "${extraBefore[@]}" "$@" "${extraAfter[@]}"
|