diff options
author | EuAndreh <eu@euandre.org> | 2021-06-24 18:17:26 -0300 |
---|---|---|
committer | EuAndreh <eu@euandre.org> | 2021-07-04 17:07:50 -0300 |
commit | 4dcfbd67afca57dbb21109579f825e60312b7f41 (patch) | |
tree | 0b41cc75ad6b2f2515658f93d4fc60f686c8aa78 /aux/workflow/sign-tarballs.sh | |
parent | nix/: Remove (diff) | |
download | euandre.org-4dcfbd67afca57dbb21109579f825e60312b7f41.tar.gz euandre.org-4dcfbd67afca57dbb21109579f825e60312b7f41.tar.xz |
aux/: Update
Diffstat (limited to 'aux/workflow/sign-tarballs.sh')
-rwxr-xr-x | aux/workflow/sign-tarballs.sh | 22 |
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 |