From b8a9c1885098b818abacbcc7455e7eeddc16a9e3 Mon Sep 17 00:00:00 2001 From: Conrad Lara - KG6JEI Date: Sun, 29 May 2016 22:04:59 -0700 Subject: [PATCH] bugfix: buildsteps scripts if checks rework Checks for BUILD_SET_VERSION use wrong bracket type OSTYPE check wasn't portable to Ubuntu Change-Id: I0183f3beae068b8524dc4dff411203fdb3878e94 --- build/buildsteps/001-prepbuild | 2 +- build/buildsteps/003-buildimage.sh | 2 +- build/tests-prebuild.sh | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/build/buildsteps/001-prepbuild b/build/buildsteps/001-prepbuild index 7a14d9dd..5fd43059 100755 --- a/build/buildsteps/001-prepbuild +++ b/build/buildsteps/001-prepbuild @@ -18,7 +18,7 @@ cat feeds.conf.default >> feeds.conf SHORT_COMMIT=$(echo "$GIT_COMMIT" | awk '{ string=substr($0, 1, 8); print string; }' ) SHORT_BRANCH=$(echo "$GIT_BRANCH" | awk 'match($0,"/"){print substr($0,RSTART+1)}') -if ( -z "$BUILD_SET_VERSION" ); then +if [ ! -z "$BUILD_SET_VERSION" ]; then echo "$BUILD_SET_VERSION" > "$BUILDROOTBASE/files/etc/mesh-release" else echo "${SHORT_BRANCH}-${BUILD_NUMBER}-${SHORT_COMMIT}" > "$BUILDROOTBASE/files/etc/mesh-release" diff --git a/build/buildsteps/003-buildimage.sh b/build/buildsteps/003-buildimage.sh index e994be14..6e9122ac 100755 --- a/build/buildsteps/003-buildimage.sh +++ b/build/buildsteps/003-buildimage.sh @@ -26,7 +26,7 @@ rm -Rf staging_dir/* SHORT_COMMIT=$(echo "$GIT_COMMIT" | awk '{ string=substr($0, 1, 8); print string; }' ) SHORT_BRANCH=$(echo "$GIT_BRANCH" | awk 'match($0,"/"){print substr($0,RSTART+1)}') -if ( -z "$BUILD_SET_VERSION" ); then +if [ ! -z "$BUILD_SET_VERSION" ]; then MYBUILDNAME="$BUILD_SET_VERSION" else MYBUILDNAME="${SHORT_BRANCH}-${BUILD_NUMBER}-${SHORT_COMMIT}" diff --git a/build/tests-prebuild.sh b/build/tests-prebuild.sh index f50ec9ba..a45e897c 100755 --- a/build/tests-prebuild.sh +++ b/build/tests-prebuild.sh @@ -33,7 +33,7 @@ LICENSE -if [[ $OSTYPE == darwin* ]] +if [ "${OSTYPE#*darwin}" != "$OSTYPE" ] then export SCRIPTBASE=$(dirname $0) else