mirror of
https://github.com/termux/termux-packages
synced 2024-06-15 11:46:41 +00:00
Update termux_step_massage.sh: changing how fix shebang paths
works
This commit is contained in:
parent
276ebf803d
commit
d375d7c8e7
|
@ -61,12 +61,8 @@ termux_step_massage() {
|
||||||
if [ "$TERMUX_PKG_NO_SHEBANG_FIX" != "true" ]; then
|
if [ "$TERMUX_PKG_NO_SHEBANG_FIX" != "true" ]; then
|
||||||
# Fix shebang paths:
|
# Fix shebang paths:
|
||||||
while IFS= read -r -d '' file; do
|
while IFS= read -r -d '' file; do
|
||||||
if head -c 100 "$file" | head -n 1 | grep -E "^#!.*/bin/.*" | grep -q -E -v "^#! ?/system"; then
|
if head -c 100 "$file" | head -n 1 | grep -E "^#!.*/bin/.*" | grep -q -E -v -e "^#! ?/system" -e "^#! ?$TERMUX_PREFIX_CLASSICAL"; then
|
||||||
if [ "$TERMUX_PACKAGE_LIBRARY" = "bionic" ]; then
|
sed --follow-symlinks -i -E "1 s@^#\!(.*)/bin/(.*)@#\!$TERMUX_PREFIX/bin/\2@" "$file"
|
||||||
sed --follow-symlinks -i -E "1 s@^#\!(.*)/bin/(.*)@#\!$TERMUX_PREFIX/bin/\2@" "$file"
|
|
||||||
elif [ "$TERMUX_PACKAGE_LIBRARY" = "glibc" ]; then
|
|
||||||
sed --follow-symlinks -i -E "1 s@^#\!(.*)/bin/(.*)@#\!$TERMUX_PREFIX_CLASSICAL/bin/\2@" "$file"
|
|
||||||
fi
|
|
||||||
fi
|
fi
|
||||||
done < <(find -L . -type f -print0)
|
done < <(find -L . -type f -print0)
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Reference in New Issue
Block a user