From: Raquel Medina Date: Mon, 25 Feb 2019 15:13:42 +0000 (+0200) Subject: autobuild: fix warnings due to cp command exit error X-Git-Tag: 7.99.1~1 X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?a=commitdiff_plain;h=refs%2Fchanges%2F07%2F20407%2F1;p=apps%2Fagl-service-data-persistence.git autobuild: fix warnings due to cp command exit error Change-Id: I8afacb63d0932d098b8672b69fc6831a6253de40 Bug-AGL: SPEC-2164 Signed-off-by: Raquel Medina --- diff --git a/autobuild/agl/autobuild b/autobuild/agl/autobuild index a832db4..db00c1a 100755 --- a/autobuild/agl/autobuild +++ b/autobuild/agl/autobuild @@ -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/autobuild/linux/autobuild b/autobuild/linux/autobuild index a832db4..db00c1a 100755 --- a/autobuild/linux/autobuild +++ b/autobuild/linux/autobuild @@ -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