Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorErich Eckner <git@eckner.net>2018-09-12 16:28:37 +0200
committerErich Eckner <git@eckner.net>2018-09-12 16:28:37 +0200
commitddf595ef3b3cfdb830404b60d10424c689525442 (patch)
treef99f4197a96018d3f28fcc960e61414c6eabc0db /bin
parent6fbd2435443e9cc9ca51bcfd640ca88e66941d18 (diff)
bin/return-assignment: check arguments
Diffstat (limited to 'bin')
-rwxr-xr-xbin/return-assignment10
1 files changed, 10 insertions, 0 deletions
diff --git a/bin/return-assignment b/bin/return-assignment
index b29764c..3f355bd 100755
--- a/bin/return-assignment
+++ b/bin/return-assignment
@@ -41,6 +41,16 @@ if [ $# -eq 1 ] && \
exit
fi
+if [ $# -ne 5 ]; then
+ >&2 printf 'return-assignment: Wrong number of arguments (%s)\n' \
+ "$#"
+ >&2 printf 'call either:\n'
+ >&2 printf ' return-assignment ABORT\n'
+ >&2 printf ' return-assignment pkgbase git_revision mod_git_revision repository ERROR\n'
+ >&2 printf ' return-assignment pkgbase git_revision mod_git_revision repository sub-pkgrel\n'
+ exit 2
+fi
+
# Create a lock file and a trap.
exec 9> "${build_list_lock_file}"