From bd32dbfe6a5609e93dfb13c5c68846bb1221a206 Mon Sep 17 00:00:00 2001 From: Ethan Sommer Date: Wed, 15 Apr 2020 15:09:11 -0400 Subject: install.sh: remove bashisms, change shebang to sh --- scripts/install.sh | 17 ++++++++--------- 1 file 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" ] -- cgit v1.2.3