- case $page in
- \#*|*/\#*) # Not a page directory (just a metadata dir)
- continue
- ;;
- \[*\]/*|*/\[*\]/*) # Omit "system" pages unless explicitly wanted
- [ "$glob_system_pages" != true ] \
- && continue \
- || pagedir="$(page_abs "$page")"
- ;;
- \:*|*/\:*) # Omit translation pages if translations are enabled
- [ "$LANGUAGE_DEFAULT" ] \
- && continue \
- || pagedir="$(page_abs "$page")"
- ;;
- *) pagedir="$(page_abs "$page")";;
- esac
+ # Not a page directory (just a metadata dir)
+ [ ! "${page%%#*}" -o ! "${page%%*/#*}" ] && continue
+
+ # Omit "system" pages unless explicitly wanted
+ [ ! "${page%%\[*\]/*}" -o ! "${page%%*/\[*\]/*}" ] && [ "$glob_system_pages" != true ] && continue
+
+ # Omit translation pages if translations are enabled
+ [ ! "${page%%:*}" -o ! "${page%%*/:*}" ] && [ "$LANGUAGE_DEFAULT" ] && continue
+
+ pagedir="$(page_abs "$page")"
+