X-Git-Url: http://git.plutz.net/?a=blobdiff_plain;f=macros%2Fpagelist;h=ed4ddbe753b14f4638483939376a78b56c24ab17;hb=65676ea8331f60d882e3baec99c101382e9fad57;hp=24252a920c6fc2f1e55dad4a666e4fff7cf3f836;hpb=9228c5d601c0ffe2b334dd13af02c7be7fa57f79;p=shellwiki diff --git a/macros/pagelist b/macros/pagelist index 24252a9..ed4ddbe 100755 --- a/macros/pagelist +++ b/macros/pagelist @@ -4,20 +4,30 @@ . "$_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 '