aboutsummaryrefslogtreecommitdiff
path: root/aux/workflow/assert-changelog.sh
diff options
context:
space:
mode:
authorEuAndreh <eu@euandre.org>2021-07-04 16:17:09 -0300
committerEuAndreh <eu@euandre.org>2021-07-04 16:17:09 -0300
commit209af7d8849515fd9f8bc2873bb7e999b2d14240 (patch)
treeff2a9c5a611d47316315fbc26dc23f052c630e85 /aux/workflow/assert-changelog.sh
parentdependencies.dot: Add colors to all; remove makecheck dependency; tabify (diff)
downloadpackage-repository-209af7d8849515fd9f8bc2873bb7e999b2d14240.tar.gz
package-repository-209af7d8849515fd9f8bc2873bb7e999b2d14240.tar.xz
aux/: Update, adjust Makefile accordingly
Diffstat (limited to '')
-rwxr-xr-xaux/workflow/assert-changelog.sh32
1 files changed, 28 insertions, 4 deletions
diff --git a/aux/workflow/assert-changelog.sh b/aux/workflow/assert-changelog.sh
index e2cd926..11088a8 100755
--- a/aux/workflow/assert-changelog.sh
+++ b/aux/workflow/assert-changelog.sh
@@ -2,10 +2,34 @@
set -eu
TLD="$(cat aux/tld.txt)"
-PROJECT_UC="$1"
-PROJECT="$2"
-shift
-shift
+PROJECT_UC=
+while getopts 'n:N:' flag; do
+ case "$flag" in
+ n)
+ PROJECT="$OPTARG"
+ ;;
+ N)
+ PROJECT_UC="$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'
+
+if [ -z "${PROJECT_UC:-}" ]; then
+ PROJECT_UC="$PROJECT"
+fi
HOMEPAGE_LINK="Changelog for [$PROJECT_UC](https://$TLD/$PROJECT/)."