patch-shebangs: filename on unsupported shebang

Show the filename on unsupported shebang error.
Simplifies debugging packages with large set of scripts.
This commit is contained in:
Kamil Chmielewski 2018-08-28 11:06:04 +02:00
parent 4c2d822fad
commit 383de74f88

View File

@ -32,7 +32,7 @@ patchShebangs() {
# - options: something starting with a '-'
# - environment variables: foo=bar
if $(echo "$arg0" | grep -q -- "^-.*\|.*=.*"); then
echo "unsupported interpreter directive \"$oldInterpreterLine\" (set dontPatchShebangs=1 and handle shebang patching yourself)"
echo "$f: unsupported interpreter directive \"$oldInterpreterLine\" (set dontPatchShebangs=1 and handle shebang patching yourself)"
exit 1
fi
newPath="$(command -v "$arg0" || true)"