summaryrefslogtreecommitdiffstats
path: root/bin/reproducible_schedule_on_demand.sh
diff options
context:
space:
mode:
authorHolger Levsen <holger@layer-acht.org>2014-10-16 00:00:34 +0200
committerHolger Levsen <holger@layer-acht.org>2014-10-16 01:59:25 +0200
commita1831441aa1e8ce198f66acf4d8051d926581848 (patch)
tree0b2995aa0258ff167b56d6ae0e653a26ab2689b3 /bin/reproducible_schedule_on_demand.sh
parent1db66fb2e4f6430da8be556be6155435a7ec20a6 (diff)
downloadjenkins.debian.net-a1831441aa1e8ce198f66acf4d8051d926581848.tar.xz
reproducible: deal gracefully with 0 packages
Diffstat (limited to 'bin/reproducible_schedule_on_demand.sh')
-rwxr-xr-xbin/reproducible_schedule_on_demand.sh6
1 files changed, 5 insertions, 1 deletions
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)