summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRomain Forlot <romain.forlot@iot.bzh>2019-03-05 09:33:59 +0100
committerRomain Forlot <romain.forlot@iot.bzh>2019-03-05 09:34:25 +0100
commita6daa45c47f553b9ff6a1120f48a322f4e834363 (patch)
treed7362568d84a17b0b51d8ce0627e74460e7b03ab
parentbcdefafe5fef09588168414d22fe2c05e9960780 (diff)
autobuild: fix warnings due to cp command exit code
Change-Id: Ie4bae20e33e05b5b166bec3fc4fadcce72ce09d3 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
-rwxr-xr-xsrc/template.d/autobuild/agl/autobuild.in8
-rwxr-xr-xsrc/template.d/autobuild/linux/autobuild.in8
2 files changed, 12 insertions, 4 deletions
diff --git a/src/template.d/autobuild/agl/autobuild.in b/src/template.d/autobuild/agl/autobuild.in
index a832db4..db00c1a 100755
--- a/src/template.d/autobuild/agl/autobuild.in
+++ b/src/template.d/autobuild/agl/autobuild.in
@@ -59,7 +59,9 @@ package: build
@mkdir -p ${BUILD_DIR}/$@/htdocs
@mkdir -p ${BUILD_DIR}/$@/var
@cmake --build ${BUILD_DIR} ${PACKAGE_ARGS} --target widget
- @mkdir -p ${DEST} && cp ${BUILD_DIR}/*.wgt ${DEST}
+ @if [ "${DEST}" != "${BUILD_DIR}" ]; then \
+ mkdir -p ${DEST} && cp ${BUILD_DIR}/*.wgt ${DEST}; \
+ fi
package-test: build
@mkdir -p ${BUILD_DIR}/$@/bin
@@ -69,7 +71,9 @@ package-test: build
@mkdir -p ${BUILD_DIR}/$@/var
@cmake --build ${BUILD_DIR} ${PACKAGE_ARGS} --target widget
@cmake --build ${BUILD_DIR} ${PACKAGE_ARGS} --target test_widget
- @mkdir -p ${DEST} && cp ${BUILD_DIR}/*.wgt ${DEST}
+ @if [ "${DEST}" != "${BUILD_DIR}" ]; then \
+ mkdir -p ${DEST} && cp ${BUILD_DIR}/*.wgt ${DEST}; \
+ fi
install: build
@cmake --build ${BUILD_DIR} ${INSTALL_ARGS} --target install
diff --git a/src/template.d/autobuild/linux/autobuild.in b/src/template.d/autobuild/linux/autobuild.in
index a832db4..db00c1a 100755
--- a/src/template.d/autobuild/linux/autobuild.in
+++ b/src/template.d/autobuild/linux/autobuild.in
@@ -59,7 +59,9 @@ package: build
@mkdir -p ${BUILD_DIR}/$@/htdocs
@mkdir -p ${BUILD_DIR}/$@/var
@cmake --build ${BUILD_DIR} ${PACKAGE_ARGS} --target widget
- @mkdir -p ${DEST} && cp ${BUILD_DIR}/*.wgt ${DEST}
+ @if [ "${DEST}" != "${BUILD_DIR}" ]; then \
+ mkdir -p ${DEST} && cp ${BUILD_DIR}/*.wgt ${DEST}; \
+ fi
package-test: build
@mkdir -p ${BUILD_DIR}/$@/bin
@@ -69,7 +71,9 @@ package-test: build
@mkdir -p ${BUILD_DIR}/$@/var
@cmake --build ${BUILD_DIR} ${PACKAGE_ARGS} --target widget
@cmake --build ${BUILD_DIR} ${PACKAGE_ARGS} --target test_widget
- @mkdir -p ${DEST} && cp ${BUILD_DIR}/*.wgt ${DEST}
+ @if [ "${DEST}" != "${BUILD_DIR}" ]; then \
+ mkdir -p ${DEST} && cp ${BUILD_DIR}/*.wgt ${DEST}; \
+ fi
install: build
@cmake --build ${BUILD_DIR} ${INSTALL_ARGS} --target install