You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by je...@apache.org on 2007/07/29 00:42:00 UTC

svn commit: r560638 - /httpd/mod_mbox/trunk/scripts/update-index

Author: jerenkrantz
Date: Sat Jul 28 15:42:00 2007
New Revision: 560638

URL: http://svn.apache.org/viewvc?view=rev&rev=560638
Log:
Sync script with deployed version on eos.

Modified:
    httpd/mod_mbox/trunk/scripts/update-index

Modified: httpd/mod_mbox/trunk/scripts/update-index
URL: http://svn.apache.org/viewvc/httpd/mod_mbox/trunk/scripts/update-index?view=diff&rev=560638&r1=560637&r2=560638
==============================================================================
--- httpd/mod_mbox/trunk/scripts/update-index (original)
+++ httpd/mod_mbox/trunk/scripts/update-index Sat Jul 28 15:42:00 2007
@@ -1,7 +1,8 @@
 #!/bin/zsh
 # ZSH 4+ script to retrieve archives in a variety of mechanisms
-DATE=`TZ=PST8PDT date -u "+%C%y%m"`
+DATE=`TZ=PST8PDT date -u "+%Y%m"`
 ARCHIVES_PATH=$HOME/archives/mbox-archives.conf
+RSYNC=/opt/sfw/bin/rsync
 
 if [ $# -ge 1 ]; then
   ARCHIVES_PATH="$1"
@@ -15,7 +16,7 @@
 source $ARCHIVES_PATH
 
 if [ "x$PRE_SYNC" != "x" ]; then
-  rsync --delete -az $PRE_SYNC_SOURCE $PRE_SYNC_DEST >/dev/null
+  $RSYNC --delete -az $PRE_SYNC_SOURCE $PRE_SYNC_DEST >/dev/null
 fi
 
 for i in ${ARCHIVES} ; do
@@ -24,7 +25,7 @@
     mboxpath=${${(P)i}[3]}
     mboxdest=${${(P)i}[4]}
 
-    #echo Updating $dirname from $mboxpath via $mboxtype
+    # echo Updating $dirname from $mboxpath via $mboxtype
 
     mboxfile=$MBOX_DIR/$dirname/$DATE.mbox
     mboxfile2=$MBOX_DIR/$dirname/$DATE
@@ -32,9 +33,9 @@
     case "$mboxtype" in
     rsync)
         # Copy into the pristine location
-        rsync --delete -az $mboxpath $mboxdest >/dev/null
+        $RSYNC --delete -az $mboxpath/ $mboxdest/ >/dev/null
         # Sync over to the mod_mbox location
-        rsync -az $mboxdest $MBOX_DIR/$dirname/ >/dev/null
+        $RSYNC -az $mboxdest/ $MBOX_DIR/$dirname/ >/dev/null
         ;;
     wget)
         wget -q $mboxpath -O $mboxfile
@@ -46,7 +47,7 @@
         fi
         ;;
     private)
-        rsync -az $mboxdest $MBOX_DIR/$dirname/ >/dev/null
+        $RSYNC -az $mboxdest/ $MBOX_DIR/$dirname/ >/dev/null
         ;;
     *)
         echo "Say what?"
@@ -69,7 +70,6 @@
       # XXX joes added these touches on 2006-06-02 to force a reindex
       touch $mboxfile; touch $mboxfile2
       $APACHE_DIR/bin/mod-mbox-util -u $MBOX_DIR/$dirname 2> /dev/null
-      $APACHE_DIR/bin/mod-mbox-util -m $mboxfile > $mboxfile.msgid
     else
       if [ -f $mboxfile ]; then
         $APACHE_DIR/bin/generate_index $mboxfile
@@ -79,7 +79,7 @@
 done
 
 if [ -x $APACHE_DIR/bin/mod-mbox-util ]; then
-  $SCRIPT_DIR/create-site-index $ARCHIVES_PATH > /dev/null
+  $SCRIPT_DIR/site-index.py > /x1/mail-archives.apache.org/mod_mbox/index.html
 else
   $SCRIPT_DIR/create-index-all $ARCHIVES_PATH
 fi