You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by ma...@apache.org on 2005/10/01 18:33:42 UTC

svn commit: r292997 - in /httpd/mod_mbox/branches/httpd-mbox-if/scripts: catchup-archive create-index create-site-index update-index

Author: maxime
Date: Sat Oct  1 09:33:34 2005
New Revision: 292997

URL: http://svn.apache.org/viewcvs?rev=292997&view=rev
Log:
Backported script changes from r231181

Modified:
    httpd/mod_mbox/branches/httpd-mbox-if/scripts/catchup-archive
    httpd/mod_mbox/branches/httpd-mbox-if/scripts/create-index
    httpd/mod_mbox/branches/httpd-mbox-if/scripts/create-site-index
    httpd/mod_mbox/branches/httpd-mbox-if/scripts/update-index

Modified: httpd/mod_mbox/branches/httpd-mbox-if/scripts/catchup-archive
URL: http://svn.apache.org/viewcvs/httpd/mod_mbox/branches/httpd-mbox-if/scripts/catchup-archive?rev=292997&r1=292996&r2=292997&view=diff
==============================================================================
--- httpd/mod_mbox/branches/httpd-mbox-if/scripts/catchup-archive (original)
+++ httpd/mod_mbox/branches/httpd-mbox-if/scripts/catchup-archive Sat Oct  1 09:33:34 2005
@@ -83,16 +83,23 @@
             ln -s $i $i.mbox
         done
 
-        for i in *.mbox; do
-            echo "Generating index for $i."
+        if [ -x $APACHE_DIR/bin/mod-mbox-util ]; then
+          echo "Generating index for $dirname."
+          $APACHE_DIR/bin/mod-mbox-util -c $MBOX_DIR/$dirname
+        else
+          for i in *.mbox; do
+            echo "Generating index for $i"
             $APACHE_DIR/bin/generate_index $i
             $APACHE_DIR/bin/load_msgid $i > $i.msgid
-        done
+          done
+        fi
 
         popd
     fi
 done
 
-# Create the indexes
-echo "Creating index for $1"
-$SCRIPT_DIR/create-index $1
+if [ ! -x $APACHE_DIR/bin/mod-mbox-util ]; then
+  # Create the indexes
+  echo "Creating index for $1"
+  $SCRIPT_DIR/create-index $1
+fi

Modified: httpd/mod_mbox/branches/httpd-mbox-if/scripts/create-index
URL: http://svn.apache.org/viewcvs/httpd/mod_mbox/branches/httpd-mbox-if/scripts/create-index?rev=292997&r1=292996&r2=292997&view=diff
==============================================================================
--- httpd/mod_mbox/branches/httpd-mbox-if/scripts/create-index (original)
+++ httpd/mod_mbox/branches/httpd-mbox-if/scripts/create-index Sat Oct  1 09:33:34 2005
@@ -49,7 +49,7 @@
         yearname=`basename $i .mbox | cut -b1-4`
         moname=`basename $i .mbox | cut -b5-6`
         echo "<tr><td>$moname/$yearname</td><td><a href=\"$i/threads.html\">Threads</a> <a href=\"$i/index.html\">Date</a> <a href=\"$i/authors.html\">Authors</a></td></tr>" >> index.html
-        if [ $moname -eq 12 ]; then
+        if [ -n $moname -a $moname -eq 12 ]; then
           echo "<tr><td colspan="2"><hr/></td></tr>" >> index.html
         fi
     done

Modified: httpd/mod_mbox/branches/httpd-mbox-if/scripts/create-site-index
URL: http://svn.apache.org/viewcvs/httpd/mod_mbox/branches/httpd-mbox-if/scripts/create-site-index?rev=292997&r1=292996&r2=292997&view=diff
==============================================================================
--- httpd/mod_mbox/branches/httpd-mbox-if/scripts/create-site-index (original)
+++ httpd/mod_mbox/branches/httpd-mbox-if/scripts/create-site-index Sat Oct  1 09:33:34 2005
@@ -43,7 +43,7 @@
     listname=`echo $dirname | cut -d '-' -f 2-`
     echo Updating $dirname index $listname @ $tlpname
 
-    echo "<li><a href=\"$dirname/\">$listname@$tlpname.apache.org</a> archive</li>" >> $MBOX_DIR/index.html
+    echo "<li><a href=\"$dirname/\">$listname@$tlpname.apache.org</a></li>" >> $MBOX_DIR/index.html
 
     if [ $count -eq $mid_count ]; then
       cat >> $MBOX_DIR/index.html <<EOF

Modified: httpd/mod_mbox/branches/httpd-mbox-if/scripts/update-index
URL: http://svn.apache.org/viewcvs/httpd/mod_mbox/branches/httpd-mbox-if/scripts/update-index?rev=292997&r1=292996&r2=292997&view=diff
==============================================================================
--- httpd/mod_mbox/branches/httpd-mbox-if/scripts/update-index (original)
+++ httpd/mod_mbox/branches/httpd-mbox-if/scripts/update-index Sat Oct  1 09:33:34 2005
@@ -14,7 +14,7 @@
 
 source $ARCHIVES_PATH
 
-if [ -n $PRE_SYNC ]; then
+if [ "x$PRE_SYNC" != "x" ]; then
   rsync --delete -az $PRE_SYNC_SOURCE $PRE_SYNC_DEST >/dev/null
 fi
 
@@ -64,10 +64,19 @@
         fi
         ln -sf $mboxfile2 $mboxfile
     fi
-    if [ -f $mboxfile ]; then
+
+    if [ -x $APACHE_DIR/bin/mod-mbox-util ]; then
+      $APACHE_DIR/bin/mod-mbox-util -u $MBOX_DIR/$dirname
+    else
+      if [ -f $mboxfile ]; then
         $APACHE_DIR/bin/generate_index $mboxfile
         $APACHE_DIR/bin/load_msgid $mboxfile > $mboxfile.msgid
+      fi
     fi
 done
 
-$SCRIPT_DIR/create-index-all $ARCHIVES_PATH
+if [ ! -x $APACHE_DIR/bin/mod-mbox-util ]; then
+  $SCRIPT_DIR/create-site-index $ARCHIVES_PATH
+else
+  $SCRIPT_DIR/create-index-all $ARCHIVES_PATH
+fi