aboutsummaryrefslogtreecommitdiff
path: root/aux/workflow/sign-tarballs.sh
diff options
context:
space:
mode:
Diffstat (limited to '')
-rwxr-xr-xaux/workflow/sign-tarballs.sh22
1 files changed, 21 insertions, 1 deletions
diff --git a/aux/workflow/sign-tarballs.sh b/aux/workflow/sign-tarballs.sh
index 8de6ac4..168d38d 100755
--- a/aux/workflow/sign-tarballs.sh
+++ b/aux/workflow/sign-tarballs.sh
@@ -1,7 +1,27 @@
#!/bin/sh
set -eu
-PROJECT="$1"
+while getopts 'n:' flag; do
+ case "$flag" in
+ n)
+ PROJECT="$OPTARG"
+ ;;
+ *)
+ exit 2
+ ;;
+ esac
+done
+shift $((OPTIND -1))
+
+assert_arg() {
+ if [ -z "$1" ]; then
+ echo "Missing $2" >&2
+ exit 2
+ fi
+}
+
+assert_arg "${PROJECT:-}" '-n PROJECT'
+
SIGNATURES="$(git notes --ref=refs/notes/signatures/tar.gz list | cut -d\ -f2)"
for tag in $(git tag); do