Fix: autobuild scripts.
authorRomain Forlot <romain.forlot@iot.bzh>
Thu, 29 Jun 2017 08:50:44 +0000 (08:50 +0000)
committerRomain Forlot <romain.forlot@iot.bzh>
Thu, 29 Jun 2017 08:50:44 +0000 (08:50 +0000)
Wrong behavior when no DEST variable defined. mkdir failed
and copy too. Now mkdir and copy happens only when DEST is
defined

Change-Id: I8a3701f1f0fae7ecae60195300c3d8d8db4493c7
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
conf.d/app-templates
conf.d/autobuild/agl/autobuild
conf.d/autobuild/linux/autobuild

index 29c5f18..a46489d 160000 (submodule)
@@ -1 +1 @@
-Subproject commit 29c5f18190d6def464107ef07ec34debe40c9766
+Subproject commit a46489d23a351e0061b6d809190b30f57b990d0d
index dc3bdec..31e29f7 100755 (executable)
@@ -38,9 +38,9 @@ package: build
        @mkdir -p ${BUILD_DIR}/$@/lib
        @mkdir -p ${BUILD_DIR}/$@/htdocs
        @mkdir -p ${BUILD_DIR}/$@/data
-       @mkdir -p ${DEST}
+       @[ "${DEST}" ] && mkdir -p ${DEST}
        @cmake --build ${BUILD_DIR} --target widget
-       @cp ${BUILD_DIR}/*wgt ${DEST}
+       @[ "${DEST}" ] && cp ${BUILD_DIR}/*wgt ${DEST}
 
 ${BUILD_DIR}/Makefile:
        @[ -d ${BUILD_DIR} ] || mkdir -p ${BUILD_DIR}
index dc3bdec..31e29f7 100755 (executable)
@@ -38,9 +38,9 @@ package: build
        @mkdir -p ${BUILD_DIR}/$@/lib
        @mkdir -p ${BUILD_DIR}/$@/htdocs
        @mkdir -p ${BUILD_DIR}/$@/data
-       @mkdir -p ${DEST}
+       @[ "${DEST}" ] && mkdir -p ${DEST}
        @cmake --build ${BUILD_DIR} --target widget
-       @cp ${BUILD_DIR}/*wgt ${DEST}
+       @[ "${DEST}" ] && cp ${BUILD_DIR}/*wgt ${DEST}
 
 ${BUILD_DIR}/Makefile:
        @[ -d ${BUILD_DIR} ] || mkdir -p ${BUILD_DIR}