From: Sebastien Douheret Date: Mon, 24 Jul 2017 09:18:59 +0000 (+0200) Subject: Support SDK directory with spaces X-Git-Tag: v0.2.0-beta~1^2~16 X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?p=src%2Fxds%2Fxds-server.git;a=commitdiff_plain;h=e9b18cd409f82928e1c4de3029ee1cc2d3816552 Support SDK directory with spaces Signed-off-by: Sebastien Douheret --- diff --git a/scripts/xds-utils/install-agl-sdks.sh b/scripts/xds-utils/install-agl-sdks.sh index 9fbacbb..f230569 100755 --- a/scripts/xds-utils/install-agl-sdks.sh +++ b/scripts/xds-utils/install-agl-sdks.sh @@ -75,7 +75,7 @@ if [ "$FILE" = "" ]; then exit 1 fi SDK_FILE=${XDT_SDK}/${FILE} -elif [ ! -f $FILE ]; then +elif [ ! -f "$FILE" ]; then echo "SDK file not found: $FILE" exit 1 else @@ -108,14 +108,14 @@ cleanExit () } # Get SDK installer -if [ ! -f ${SDK_FILE} ]; then +if [ ! -f "${SDK_FILE}" ]; then do_cleanup=true - wget "$SDK_BASEURL/$FILE" -O ${SDK_FILE} || exit 1 + wget "$SDK_BASEURL/$FILE" -O "${SDK_FILE}" || exit 1 fi # Retreive default install dir to extract version -offset=$(grep -na -m1 "^MARKER:$" ${SDK_FILE} | cut -d':' -f1) -eval $(head -n $offset ${SDK_FILE} | grep ^DEFAULT_INSTALL_DIR= ) +offset=$(grep -na -m1 "^MARKER:$" "${SDK_FILE}" | cut -d':' -f1) +eval $(head -n $offset "${SDK_FILE}" | grep ^DEFAULT_INSTALL_DIR= ) VERSION=$(basename $DEFAULT_INSTALL_DIR) [ "$PROFILE" = "" ] && { echo "PROFILE is not set"; exit 1; }