Immediately exit compile.sh if whitespace in path is detected. #762

This commit is contained in:
ThomasKaiser
2017-09-13 12:59:03 +02:00
parent 8f2de5dabd
commit 6178cca694

View File

@@ -16,6 +16,10 @@
SRC=$(dirname $(realpath ${BASH_SOURCE}))
# fallback for Trusty
[[ -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)
cd $SRC
if [[ -f $SRC/lib/general.sh && -L $SRC/main.sh ]]; then