diff options
author | Jani Välimaa <wally@mageia.org> | 2019-12-24 12:59:20 +0200 |
---|---|---|
committer | Jani Välimaa <wally@mageia.org> | 2019-12-24 12:59:20 +0200 |
commit | 46ec33799d6f74fdd7c9064dfc8f3b6b6f5ba097 (patch) | |
tree | c0a41ea4e7374c559d211c4e900a543d625e6457 | |
parent | 0df0e51b1a48e32ea92d658513ed878b4006a381 (diff) | |
download | rpm-setup-46ec33799d6f74fdd7c9064dfc8f3b6b6f5ba097.tar rpm-setup-46ec33799d6f74fdd7c9064dfc8f3b6b6f5ba097.tar.gz rpm-setup-46ec33799d6f74fdd7c9064dfc8f3b6b6f5ba097.tar.bz2 rpm-setup-46ec33799d6f74fdd7c9064dfc8f3b6b6f5ba097.tar.xz rpm-setup-46ec33799d6f74fdd7c9064dfc8f3b6b6f5ba097.zip |
brp-mangle-shebangs: do not exit if read has a non-zero status
At least building texlive-texmf fails without this because brp-mangle-shebangs has -e in its shebang.
-e Exit immediately if a command exits with a non-zero status.
$ read shebang_line < BUILD/texlive-20190410-texmf/texmf-dist/doc/generic/pst-mirror/createEPS/test.sh
$ echo $?
1
-rw-r--r-- | NEWS | 3 | ||||
-rwxr-xr-x | brp-mangle-shebangs | 2 |
2 files changed, 4 insertions, 1 deletions
@@ -1,3 +1,6 @@ +- make brp-mangle-shebangs to not exit if 'read shebang_line < "$f"' + exits with a non-zero status. + Version 2.45 - 23 December 2019, by Thierry Vignaud - switch binary payload compression to Zstandard level 19 diff --git a/brp-mangle-shebangs b/brp-mangle-shebangs index 98990c0..4964c09 100755 --- a/brp-mangle-shebangs +++ b/brp-mangle-shebangs @@ -93,7 +93,7 @@ while IFS= read -r line; do fi - read shebang_line < "$f" + read shebang_line < "$f" ||: orig_shebang="${shebang_line#\#!}" if [ "$orig_shebang" = "$shebang_line" ]; then echo >&2 "*** WARNING: $f is executable but has no shebang, removing executable bit" |