diff options
author | Ethan Sommer <e5ten.arch@gmail.com> | 2020-04-15 15:09:11 -0400 |
---|---|---|
committer | Cem Keylan <cem@ckyln.com> | 2021-07-04 16:05:11 +0300 |
commit | bd32dbfe6a5609e93dfb13c5c68846bb1221a206 (patch) | |
tree | af53677f8c3a43e2d81302bd15139b3ada9aa99d | |
parent | 64ee5da8cb6b06ae1bbe2e39b30b2316a42ba71c (diff) | |
download | toybox-bd32dbfe6a5609e93dfb13c5c68846bb1221a206.tar.gz |
install.sh: remove bashisms, change shebang to sh
-rwxr-xr-x | scripts/install.sh | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/scripts/install.sh b/scripts/install.sh index adf36027..ce486260 100755 --- a/scripts/install.sh +++ b/scripts/install.sh @@ -1,8 +1,8 @@ -#!/bin/bash +#!/bin/sh # Grab default values for $CFLAGS and such. -source ./configure +. ./configure [ -z "$PREFIX" ] && PREFIX="/usr/toybox" @@ -12,19 +12,19 @@ LONG_PATH="" while [ ! -z "$1" ] do # Create symlinks instead of hardlinks? - [ "$1" == "--symlink" ] && LINK_TYPE="-s" + [ "$1" = "--symlink" ] && LINK_TYPE="-s" # Uninstall? - [ "$1" == "--uninstall" ] && UNINSTALL=Uninstall + [ "$1" = "--uninstall" ] && UNINSTALL=Uninstall # Delete destination command if it exists? - [ "$1" == "--force" ] && DO_FORCE="-f" + [ "$1" = "--force" ] && DO_FORCE="-f" # Use {,usr}/{bin,sbin} paths instead of all files in one directory? - [ "$1" == "--long" ] && LONG_PATH="bin/" + [ "$1" = "--long" ] && LONG_PATH="bin/" # Symlink host toolchain binaries to destination to create cross compile $PATH - [ "$1" == "--airlock" ] && AIRLOCK=1 + [ "$1" = "--airlock" ] && AIRLOCK=1 shift done @@ -130,8 +130,7 @@ do ln -sf "$j" "$FALLBACK/$i" || exit 1 fi - X=$[$X+1] - FALLBACK="$PREFIX/fallback-$X" + FALLBACK="$PREFIX/fallback-$((X += 1))" done if [ ! -f "$PREFIX/$i" ] |