Sophie

Sophie

distrib > Mandriva > 2010.1 > x86_64 > by-pkgid > cffa7e52474afabc794a42260ccf9f48 > files > 27

apache-mod_mbox-0.2-1.r670198.5mdv2010.1.x86_64.rpm

#!/bin/zsh
# You need to run this file and place it as mbox-archives.list and all will
# be well.

prefix="$HOME/archives/raw"

lists=()
rsync www.apache.org:: > sites.$$
lists=(`grep -- "site " sites.$$ | grep -v cvs | cut -d " " -f 1` www-site)
rm sites.$$

i=1
while [ $i -le ${#lists} ]; do
  if [ ! -d $prefix/$lists[$i]/mail ]; then
    echo Creating $prefix/$lists[$i]/mail
    mkdir -p $prefix/$lists[$i]/mail
    rsync -az --exclude '*.gz' --exclude '[0-9]*' www.apache.org::$lists[$i]/mail/ $prefix/$lists[$i]/mail
    if [ $? -ne 0 ]; then
      rmdir $prefix/$lists[$i]/mail
    fi
  fi
  ((i=1+$i))
done