From aeeb2190338de08393ee52ca1cd4873f2dc3208a Mon Sep 17 00:00:00 2001 From: =?utf8?q?Paul=20H=C3=A4nsch?= Date: Wed, 20 Sep 2023 23:08:10 +0200 Subject: [PATCH] `changes` macro: allow multiple location arguments --- macros/changes | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/macros/changes b/macros/changes index 596a237..54f4782 100755 --- a/macros/changes +++ b/macros/changes @@ -22,12 +22,15 @@ _(){ printf %s\\n "$*"; } [ "${LANGUAGE}" -a -r "${_EXEC}/l10n/${LANGUAGE}.sh" ] && . "${_EXEC}/l10n/${LANGUAGE}.sh" LANGUAGES='' glob="/" depth=-1 +set -- "$@" -- while [ $# -gt 0 ]; do case $1 in --system) glob_system_pages=true; shift 1;; :*) LANGUAGES="${LANGUAGES}${LANGUAGES:+ }${1#:}"; shift 1;; --depth) depth="$2"; shift 2;; - *) glob="$1"; shift 1;; + --) shift 1; break;; + *) set -- "$@" "$1"; shift 1;; esac; done +[ "$*" ] || set -- / page='' page_abs='' ostamp='' odate='' lstamp='' ldate='' row='' rowstate='' @@ -35,7 +38,11 @@ printf '\n' for l in $LANGUAGES; do printf '' "$l"; done printf '\n\n' -page_glob "$glob" "$depth" |while read page; do +for glob in "$@"; do + page_glob "$glob" "$depth" +done \ +| sort -u \ +| while read page; do page_abs="$(page_abs "$page")" acl_read "${page_abs}" || continue -- 2.39.2
Page%s