From: Adam Dickmeiss Date: Mon, 19 May 2014 12:19:08 +0000 (+0200) Subject: Avoid No RPM in arch message when useless X-Git-Url: http://sru.miketaylor.org.uk/cgi-bin?a=commitdiff_plain;h=7d8c5ed8093a91ad072d3769d81b0dfb8ecb64ee;p=git-tools-moved-to-github.git Avoid No RPM in arch message when useless --- 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