From 35f71829125f921f730194566860564bca1415be Mon Sep 17 00:00:00 2001 From: Igor Gnatenko Date: Feb 07 2018 17:23:28 +0000 Subject: brp-mangle-shebangs: fix mangling absolute paths in /.../env Signed-off-by: Igor Gnatenko --- 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@')