#!/bin/bash
# this script grep openwebmail-current.tar.gz from devel site every night
# Thomas Chung <tchung@openwebmail.org>
# 2008.02.22

# get openwebmail-current.tar.gz
cd /var/www/html/openwebmail.org/openwebmail/download/current
wget http://openwebmail.acatysmoof.com/download/current/openwebmail-current.tar.gz -O .openwebmail-current.tar.gz
mv .openwebmail-current.tar.gz openwebmail-current.tar.gz

# get MD5SUM
rm -rf MD5SUM
wget http://openwebmail.acatysmoof.com/download/current/MD5SUM

# put the latest online doc and help
tar zxf openwebmail-current.tar.gz
rm -rf /var/www/html/openwebmail.org/openwebmail/{doc,help}
cp -a data/openwebmail/{doc,help} /var/www/html/openwebmail.org/openwebmail/
rm -rf data cgi-bin

