From 6da8dd4d586812659ed22fa56f966f28d5958f49 Mon Sep 17 00:00:00 2001 From: Bunnaroath Sou Date: Tue, 5 Mar 2019 18:31:05 -0800 Subject: Make update script independent of bash --- bsp/update-targets.sh | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'bsp') diff --git a/bsp/update-targets.sh b/bsp/update-targets.sh index 8f094e5..13cd32b 100755 --- a/bsp/update-targets.sh +++ b/bsp/update-targets.sh @@ -13,7 +13,7 @@ EOF unset DTSFILE unset CUSTOM_PATH unset CUSTOM_NAME -while [[ "$1" != "" ]] +while [ "$1" != "" ] do case "$1" in --help) help "$0"; exit 0;; @@ -26,25 +26,25 @@ do esac done -if [[ "$CUSTOM_PATH" == "" && "$CUSTOM_NAME" == "" && "$DTSFILE" == "" ]] +if [ "$CUSTOM_PATH" == "" -a "$CUSTOM_NAME" == "" -a "$DTSFILE" == "" ] then TARGET_LIST="$(ls -d coreip*) " TARGET_LIST+="sifive-hifive1 freedom-e310-arty " else - if [[ ! -f "$DTSFILE" && "$DTSFILE" != "*.dts" ]] + if [ ! -f "$DTSFILE" -a "$DTSFILE" != "*.dts" ] then echo "[ERROR] $0: $DTSFILE must be a dts file" >&2 help "$0" exit 1 fi - if [[ "$CUSTOM_NAME" == "" ]] + if [ "$CUSTOM_NAME" == "" ] then echo "[ERROR] $0: --target-name is mandatory" >&2 help "$0" exit 1 fi CUSTOM_TARGET="$CUSTOM_PATH/bsp/$CUSTOM_NAME" - if [[ ! -d "$CUSTOM_TARGET" ]] + if [ ! -d "$CUSTOM_TARGET" ] then echo "[ERROR] $0: "$CUSTOM_TARGET" not found!" >&2 help "$0" -- cgit v1.2.1-18-gbd029