termux_step_massage: Insert `head -n 1` in shebang fix
to avoid "binary file matches" message.
This commit is contained in:
parent
e9b1e0b2da
commit
acec7e6460
|
@ -36,7 +36,7 @@ termux_step_massage() {
|
|||
if [ "$TERMUX_PKG_NO_SHEBANG_FIX" != "true" ]; then
|
||||
# Fix shebang paths:
|
||||
while IFS= read -r -d '' file; do
|
||||
if head -c 100 "$file" | grep -E "^#!.*/bin/.*" | grep -q -E -v "^#! ?/system"; then
|
||||
if head -c 100 "$file" | head -n 1 | grep -E "^#!.*/bin/.*" | grep -q -E -v "^#! ?/system"; then
|
||||
sed --follow-symlinks -i -E "1 s@^#\!(.*)/bin/(.*)@#\!$TERMUX_PREFIX/bin/\2@" "$file"
|
||||
fi
|
||||
done < <(find -L . -type f -print0)
|
||||
|
|
Loading…
Reference in New Issue