From 586d8a2a142c1a023fcb8fa358beb64209b58402 Mon Sep 17 00:00:00 2001 From: Leonid Plyushch Date: Sun, 2 Apr 2017 15:45:35 +0300 Subject: [PATCH] termux-tools: fix termux-fix-shebang script (#888) --- packages/termux-tools/termux-fix-shebang | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/packages/termux-tools/termux-fix-shebang b/packages/termux-tools/termux-fix-shebang index 1ac56c2c8..84bbca4ff 100755 --- a/packages/termux-tools/termux-fix-shebang +++ b/packages/termux-tools/termux-fix-shebang @@ -7,7 +7,6 @@ if [ $# = 0 -o "$1" = "-h" ]; then exit 1 fi -for file in $@; do - # Do realpath to avoid breaking symlinks (modify original file): - sed -i -E "1 s@^#\!(.*)/bin/(.*)@#\!/data/data/com.termux/files/usr/bin/\2@" `realpath $@` +for file in "$@"; do + sed -i -E "1 s@^#\!(.*)/[sx]?bin/(.*)@#\!/data/data/com.termux/files/usr/bin/\2@" "$(realpath "${file}")" done