Fix 'whitespace in path' fix

This commit is contained in:
ThomasKaiser
2017-09-14 03:13:26 -07:00
parent 2bfedd7198
commit 2f3fd75544

View File

@@ -13,12 +13,12 @@
# use configuration files like config-default.conf to set the build configuration
# check Armbian documentation for more info
SRC=$(dirname $(realpath ${BASH_SOURCE}))
SRC="$(dirname "$(realpath "${BASH_SOURCE}")")"
# fallback for Trusty
[[ -z $SRC ]] && SRC=$(pwd)
[[ -z "${SRC}" ]] && SRC="$(pwd)"
# check for whitespace in $SRC and exit for safety reasons
grep -q "[[:space:]]" <<<"${SRC}" && (echo "The path \"${SRC}\" contains whitespace. Not supported" >&2 ; exit 1)
grep -q "[[:space:]]" <<<"${SRC}" && { echo "\"${SRC}\" contains whitespace. Not supported. Aborting." >&2 ; exit 1 ; }
cd $SRC