X-Git-Url: http://git.plutz.net/?a=blobdiff_plain;f=macros%2Fpagelist;h=ed4ddbe753b14f4638483939376a78b56c24ab17;hb=65676ea8331f60d882e3baec99c101382e9fad57;hp=7c800418c41c02a259caab7bc7eeb79c14963e42;hpb=6b5c4236198e1438d6ca9d70a2893d8a2bfe0945;p=shellwiki diff --git a/macros/pagelist b/macros/pagelist index 7c80041..ed4ddbe 100755 --- a/macros/pagelist +++ b/macros/pagelist @@ -1,24 +1,30 @@ #!/bin/sh . "$_EXEC/cgilite/cgilite.sh" -. "$_EXEC/cgilite/users.sh" . "$_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 '