Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/bin/build-packages
diff options
context:
space:
mode:
Diffstat (limited to 'bin/build-packages')
-rwxr-xr-xbin/build-packages12
1 files changed, 10 insertions, 2 deletions
diff --git a/bin/build-packages b/bin/build-packages
index f10f036..435d096 100755
--- a/bin/build-packages
+++ b/bin/build-packages
@@ -18,7 +18,7 @@ usage() {
>&2 echo ' -h|--help: Show this help and exit.'
>&2 echo ' -n count: Build $count packages (if available), then exit.'
>&2 echo ' $count=0 is interpreted as infinity.'
- >&2 echo ' The default is $count=1.'
+ >&2 echo ' The default is $count=1 or 0 iff -t or -x is given.'
>&2 echo ' -t seconds: Do not request new assignment(s) $seconds seconds after start.'
>&2 echo ' -x: If package build fails, do not request new assignment(s).'
[ -z "$1" ] && exit 1 || exit $1
@@ -31,7 +31,7 @@ eval set -- "$(
echo usage
)"
-count=1
+unset count
exit_after_failure=false
timeout=0
@@ -71,6 +71,14 @@ if [ $# -ne 0 ]; then
usage
fi
+if [ -z "${count}" ]; then
+ if [ ${timeout} -ne 0 ] || ${exit_after_failure}; then
+ count=-1
+ else
+ count=1
+ fi
+fi
+
if [ ${timeout} -ne 0 ]; then
timeout=$[${timeout}+$(date +%s)]
fi