aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xbrp-mangle-shebangs7
1 files changed, 7 insertions, 0 deletions
diff --git a/brp-mangle-shebangs b/brp-mangle-shebangs
index f27ad73..bd60d4a 100755
--- a/brp-mangle-shebangs
+++ b/brp-mangle-shebangs
@@ -136,6 +136,13 @@ while IFS= read -r line; do
continue
fi
+ if [ -n "$exclude_shebangs" ]; then
+ echo "$shebang" | grep -q -E "$exclude_shebangs" && continue
+ fi
+ if [ -n "$exclude_shebangs_from" ]; then
+ echo "$shebang" | grep -q -E -f "$exclude_shebangs_from" && continue
+ fi
+
# Replace "special" env shebang:
# /whatsoever/env -whatever /whatever/foo → /whatever/foo
shebang=$(echo "$shebang" | sed -r -e 's@^(.+)/env( -[^ ]+)* /(.+)$@/\3@')