]> git.plutz.net Git - serve0/blobdiff - index.cgi
indexing stubs
[serve0] / index.cgi
index 7b4921a4878ac806d06bbebf83c508c451dd7853..000e8550870a845da6fa504522b6db44bb0e87d2 100755 (executable)
--- a/index.cgi
+++ b/index.cgi
@@ -40,6 +40,15 @@ elif [ -f "$_DATA/$ITEM" ]; then
   esac
 elif [ -d "$_DATA/$ITEM" ]; then
   case $(GET a) in
+    spawnindex)
+      if [ "$(POST recursive)" = yes ]; then
+        find "$_DATA/$ITEM" -depth -type d \! -name .index \
+                            -exec mkdir -p '{}'/.index \;
+      else
+        mkdir -p "$_DATA/$ITEM/.index"
+      fi
+      REDIRECT "$(POST ref)"
+    ;;
     multitag)
     ;;
     *) . "$_EXEC/list.sh"