From 35f71829125f921f730194566860564bca1415be Mon Sep 17 00:00:00 2001 From: Igor Gnatenko Date: Wed, 7 Feb 2018 18:11:42 +0100 Subject: [PATCH] brp-mangle-shebangs: fix mangling absolute paths in /.../env Signed-off-by: Igor Gnatenko --- brp-mangle-shebangs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/brp-mangle-shebangs b/brp-mangle-shebangs index 9a65305..ca20c94 100755 --- a/brp-mangle-shebangs +++ b/brp-mangle-shebangs @@ -34,6 +34,8 @@ for f in $(find -executable -type f | xargs --no-run-if-empty file -N --mime-typ fi # Replace "special" env shebang: + # /whatsoever/env /whatever/foo → /whatever/foo + shebang=$(echo "$shebang" | sed -r -e 's@^(.+)/env /(.+)$@/\2@') # /whatsoever/env foo → /whatsoever/foo shebang=$(echo "$shebang" | sed -r -e 's@^(.+/)env (.+)$@\1\2@')