summaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
authorChris Lamb <lamby@debian.org>2015-02-19 02:17:52 +0000
committerChris Lamb <lamby@debian.org>2015-02-19 02:18:01 +0000
commita51f8999a4e5b6053f082cc67e2ee48a33f54744 (patch)
tree38941f4fe8dd7c98d9d6614490215985259ce6e2 /bin
parent233aace4934dc899faa86edbff503318bbb391cd (diff)
downloadjenkins.debian.net-a51f8999a4e5b6053f082cc67e2ee48a33f54744.tar.xz
"17 package(s)" / "1 package(s)" => "17 packages" / "1 package"
Diffstat (limited to 'bin')
-rwxr-xr-xbin/reproducible_schedule_on_demand.sh14
1 files changed, 11 insertions, 3 deletions
diff --git a/bin/reproducible_schedule_on_demand.sh b/bin/reproducible_schedule_on_demand.sh
index 5e3c56e0..f57dcd0f 100755
--- a/bin/reproducible_schedule_on_demand.sh
+++ b/bin/reproducible_schedule_on_demand.sh
@@ -36,10 +36,18 @@ check_candidates() {
let "TOTAL+=1"
fi
done
- if [ $TOTAL -eq 0 ] ; then
+ case $TOTAL in
+ 0)
echo "No packages to schedule, exiting."
exit 0
- fi
+ ;;
+ 1)
+ PACKAGES_TXT="package"
+ ;;
+ *)
+ PACKAGES_TXT="packages"
+ ;;
+ esac
}
#
@@ -52,7 +60,7 @@ if [ ${#PACKAGES} -gt 256 ] ; then
BLABLABLA="..."
fi
PACKAGES=$(echo $PACKAGES)
-MESSAGE="$TOTAL package(s) manually (re-)scheduled for immediate testing: ${PACKAGES:0:256}$BLABLABLA"
+MESSAGE="$TOTAL $PACKAGES_TXT manually (re-)scheduled for immediate testing: ${PACKAGES:0:256}$BLABLABLA"
# finally
schedule_packages