From a1831441aa1e8ce198f66acf4d8051d926581848 Mon Sep 17 00:00:00 2001 From: Holger Levsen Date: Thu, 16 Oct 2014 00:00:34 +0200 Subject: reproducible: deal gracefully with 0 packages --- bin/reproducible_schedule_on_demand.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'bin') diff --git a/bin/reproducible_schedule_on_demand.sh b/bin/reproducible_schedule_on_demand.sh index e873154b..1002890e 100755 --- a/bin/reproducible_schedule_on_demand.sh +++ b/bin/reproducible_schedule_on_demand.sh @@ -33,6 +33,10 @@ check_candidates() { let "TOTAL+=1" fi done + if [ $TOTAL -eq 0 ] ; then + echo "No packages to schedule, exiting." + exit 0 + fi } @@ -43,7 +47,7 @@ check_candidates() { set +x CANDIDATES="$@" check_candidates -if [ $#{PACKAGES} -gt 256 ] ; then +if [ ${#PACKAGES} -gt 256 ] ; then BLABLABLA="..." fi PACKAGES=$(echo $PACKAGES) -- cgit v1.2.3-70-g09d2