X-Git-Url: https://git.plutz.net/?a=blobdiff_plain;f=macros%2Fpagelist;h=ed4ddbe753b14f4638483939376a78b56c24ab17;hb=4b293f028acf3cd3b2417a9c5b19c3faac24fb13;hp=e9f5a33e191be7ba9796e2aa8911cdccd6d1b5db;hpb=f7710b2f821cd2a7dc11f7818f10b70d065b5b52;p=shellwiki diff --git a/macros/pagelist b/macros/pagelist index e9f5a33..ed4ddbe 100755 --- a/macros/pagelist +++ b/macros/pagelist @@ -4,20 +4,27 @@ . "$_EXEC/acl.sh" . "$_EXEC/tools.sh" -dir="${1:-./}" -depth="${2:-1}" +while [ $# -gt 0 ]; do case $1 in + --system) glob_system_pages=true; shift 1;; + --depth) depth="$2" shift 2;; + *) if [ ! "$dir" ]; then + dir="$1" + elif [ ! "$depth" ]; then + depth="$1" + fi + shift 1;; +esac; done -printf '