X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?a=blobdiff_plain;f=scripts%2F.aglsetup_genconfig.bash;h=d4f3ba813107cc897f123c899ab6a5676fac78f5;hb=b8f17a47bdee67e5b3e7085199a17004caaf6f9c;hp=af2b7473b3808e8d655e49640a47157c5d9dd2ca;hpb=94bbb1e9719ddca56db6d03d16b024c8c7bffd33;p=AGL%2Fmeta-agl.git diff --git a/scripts/.aglsetup_genconfig.bash b/scripts/.aglsetup_genconfig.bash index af2b7473b..d4f3ba813 100755 --- a/scripts/.aglsetup_genconfig.bash +++ b/scripts/.aglsetup_genconfig.bash @@ -67,6 +67,13 @@ function list_all_machines() { 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 @@ -206,7 +213,7 @@ function append_fragment() { function execute_setup() { script=$1 debug "Executing script $script" - opts= + opts="-e" [[ $DEBUG == 1 ]] && opts="$opts -x" pushd $BUILDDIR &>/dev/null $BASH $opts $script \ @@ -335,7 +342,8 @@ done # 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() {