The absolute build path shouldn't contain any space.
Discussion: https://lists.linuxfoundation.org/pipermail/automotive-discussions/2017-February/003522.html
Change-Id: If3de580a2a8fd0f944c40f669a9fcd2de7e1f04b
Signed-off-by: Stephane Desneux <stephane.desneux@iot.bzh>
done
}
+function validate_builddir() {
+ if [[ "$BUILDDIR" =~ [[:space:]] ]]; then
+ error "Build dir '$BUILDDIR' shouldn't contain any space"
+ fi
+ debug "Build dir is valid"
+}
+
function validate_machines() {
list_all_machines | sort | uniq -c | while read cnt machine; do
[[ $cnt == 1 ]] && continue
# validate build dir
debug "validating builddir $BUILDDIR"
-BUILDDIR=$(mkdir -p $BUILDDIR && cd $BUILDDIR && pwd -P)
+BUILDDIR=$(mkdir -p "$BUILDDIR" && cd "$BUILDDIR" && pwd -P)
+validate_builddir
###########################################################################################
function dump_log() {