From 7d8c5ed8093a91ad072d3769d81b0dfb8ecb64ee Mon Sep 17 00:00:00 2001 From: Adam Dickmeiss Date: Mon, 19 May 2014 14:19:08 +0200 Subject: [PATCH] Avoid No RPM in arch message when useless --- id-rpm-build/upload-rpms.sh | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/id-rpm-build/upload-rpms.sh b/id-rpm-build/upload-rpms.sh index bc4e6c7..0562b70 100755 --- a/id-rpm-build/upload-rpms.sh +++ b/id-rpm-build/upload-rpms.sh @@ -44,19 +44,23 @@ fi for pkg in ${pkg_names}; do if $inc_src; then if test ! -f ${BUILD_DIR}/SRPMS/${pkg}.src.rpm; then - echo "No SRPM for ${pkg}" - else - scp ${BUILD_DIR}/SRPMS/${pkg}.src.rpm ${UPLOAD_URI}/redhat/${DISTRO}/SRPMS/ - fi - fi + echo "FAILED: No SRPM for ${pkg}" + exit 1 + fi + scp ${BUILD_DIR}/SRPMS/${pkg}.src.rpm ${UPLOAD_URI}/redhat/${DISTRO}/SRPMS/ + fi if $inc_bin; then + copy=false for dir in ${BUILD_DIR}/RPMS/*; do arch=`basename ${dir}` if test -f ${dir}/${pkg}.${arch}.rpm; then + copy=true scp ${dir}/${pkg}.${arch}.rpm ${UPLOAD_URI}/redhat/${DISTRO}/RPMS/${arch}/ - else - echo "No ${pkg} in arch ${arch}" fi done + if ! $copy; then + echo "FAILED: No RPM copied for: ${pkg}" + exit 1 + fi fi done -- 1.7.10.4