diff options
author | EuAndreh <eu@euandre.org> | 2021-07-04 16:17:09 -0300 |
---|---|---|
committer | EuAndreh <eu@euandre.org> | 2021-07-04 16:17:09 -0300 |
commit | 209af7d8849515fd9f8bc2873bb7e999b2d14240 (patch) | |
tree | ff2a9c5a611d47316315fbc26dc23f052c630e85 /aux/workflow/TODOs.sh | |
parent | dependencies.dot: Add colors to all; remove makecheck dependency; tabify (diff) | |
download | package-repository-209af7d8849515fd9f8bc2873bb7e999b2d14240.tar.gz package-repository-209af7d8849515fd9f8bc2873bb7e999b2d14240.tar.xz |
aux/: Update, adjust Makefile accordingly
Diffstat (limited to '')
-rwxr-xr-x | aux/workflow/TODOs.sh | 40 |
1 files changed, 36 insertions, 4 deletions
diff --git a/aux/workflow/TODOs.sh b/aux/workflow/TODOs.sh index f93ece8..6c24c3e 100755 --- a/aux/workflow/TODOs.sh +++ b/aux/workflow/TODOs.sh @@ -1,11 +1,43 @@ #!/bin/sh set -eu -PROJECT_UC="$1" -PROJECT="$2" -MAILING_LIST="$3" -OUTDIR="$4" TLD="$(cat aux/tld.txt)" +PROJECT_UC= +while getopts 'n:N:m:o:' flag; do + case "$flag" in + n) + PROJECT="$OPTARG" + ;; + N) + PROJECT_UC="$OPTARG" + ;; + m) + MAILING_LIST="$OPTARG" + ;; + o) + OUTDIR="$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' +assert_arg "${MAILING_LIST:-}" '-m MAILING_LIST' +assert_arg "${OUTDIR:-}" '-o OUTDIR' + +if [ -z "${PROJECT_UC:-}" ]; then + PROJECT_UC="$PROJECT" +fi TODOS_ADD_REGEX='s/^## (TODO|DOING|WAITING|MEETING|INACTIVE|NEXT|CANCELLED|DONE) (.*) \{#(.*?)\}$/## <a href="#\3"><span class="\1">\1<\/span> \2<\/a>\n<pre class="header-anchor" id="\3">#\3<\/pre>\n/' TODOS_CLEANUP_REGEX1='s/(<a><a)/<a/' |