Properly catch empty $PKG
authorChristoph Berg <myon@debian.org>
Thu, 24 Mar 2016 13:53:54 +0000 (14:53 +0100)
committerChristoph Berg <myon@debian.org>
Thu, 24 Mar 2016 13:53:54 +0000 (14:53 +0100)
jenkins/debcheck-pgapt

index 47467a54f1e25554bb4abd77714e797a7eaa17d7..fdd2cd05ec23509e230b1c4b9d3ef87d2932ddbf 100755 (executable)
@@ -77,6 +77,8 @@ $DEBCHECK ${EXTRAFG:-} --bg $DISTSDIR/$DIST/main/binary-${architecture}/Packages
 for P in $DISTSDIR/$DIST/?.?/binary-${architecture}/Packages; do
        test -s $P && PKG="${PKG:-} $P"
 done
-$DEBCHECK --fg ${PKG:-} || EXIT=$?
+if [ "${PKG:-}" ]; then
+  $DEBCHECK --fg $PKG || EXIT=$?
+fi
 
 exit ${EXIT:-0}