mirror of
https://github.com/armbian/build
synced 2025-09-24 19:47:06 +07:00
Fix 'whitespace in path' fix
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user