Use posix shell variable expansion substitution instead of subshells with sed
This commit is contained in:
1 parent
0ec597b1bb
commit
818766d3d4
5 files changed
+18
-13
No files matched your search
@@ -19,8 +19,9 @@ if [ "$1" = "-v" ]; then
|
||||
exit 0
|
||||
fi
|
||||
|
||||
TARGET="$(basename $0 | sed 's/-[^-]*$//')"
|
||||
ARCH=$(echo $TARGET | sed 's/-.*//')
|
||||
BASENAME="$(basename "$0")"
|
||||
TARGET="${BASENAME%-*}"
|
||||
ARCH="${TARGET%%-*}"
|
||||
case $ARCH in
|
||||
i686) M=i386pe ;;
|
||||
x86_64) M=i386pep ;;
|
||||
|
||||
Reference in new issue
Block a user