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
@@ -3,8 +3,9 @@
|
||||
DIR="$(cd "$(dirname "$0")" && pwd)"
|
||||
export PATH=$DIR:$PATH
|
||||
|
||||
TARGET="$(basename $0 | sed 's/-[^-]*$//')"
|
||||
ARCH=$(echo $TARGET | sed 's/-.*//')
|
||||
BASENAME="$(basename "$0")"
|
||||
TARGET="${BASENAME%-*}"
|
||||
ARCH="${TARGET%%-*}"
|
||||
case $ARCH in
|
||||
i686) M=i386 ;;
|
||||
x86_64) M=i386:x86-64 ;;
|
||||
|
||||
Reference in new issue
Block a user