From: Daniel Farrell Date: Tue, 23 Jan 2018 01:01:59 +0000 (-0500) Subject: Clearer error message if unexpected num RPMs X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=commitdiff_plain;h=refs%2Fchanges%2F52%2F67452%2F1;p=releng%2Fbuilder.git Clearer error message if unexpected num RPMs Change-Id: Ia277eed4b9c164ff8071d0e88d6aff1c8886e565 Signed-off-by: Daniel Farrell --- diff --git a/jjb/packaging/test-rpm-deps.sh b/jjb/packaging/test-rpm-deps.sh index 6def490d0..460bdaeed 100644 --- a/jjb/packaging/test-rpm-deps.sh +++ b/jjb/packaging/test-rpm-deps.sh @@ -8,8 +8,12 @@ set -ex -o pipefail # Verify exactly 1 RPM is in the path we expect set -- /home/$USER/rpmbuild/RPMS/noarch/*.rpm -# shellcheck disable=SC1054 -[ $# -eq 1 ] || {{ echo "Expected 1 RPM, found $#"; exit 1; }} +if [ $# -eq 1 ]; then + echo "Found one RPM in build out dir, as expected" +else + echo "Expected 1 RPM, found $#" + echo 1 +fi # If path is globbed (/path/to/*.rpm), expand it path=$(sudo find / -wholename /home/$USER/rpmbuild/RPMS/noarch/*.rpm)