diff --git a/compile.sh b/compile.sh index 061a0c852..35831faa3 100755 --- a/compile.sh +++ b/compile.sh @@ -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