This script will download devtools-7.0 for SME Server 7.0 (beta1). Use at your OWN RISK!

---> Do not include this line. This script is for SME7 upto alpha25

#!/bin/bash
# Copied from http://forums.contribs.org and modified by hfwang.
# Use at your own risc!! I DO NOT accept any responsibility whatsoever.
# Please leave this header intact. The latest version can be found at:
# HomePage.html/devtools-7.0

while [ "$start" != "y" ] ; do
echo ''
echo '**********************************************************************'
echo 'This script will download the SME Server developers tools version 7.0'
echo 'Please be aware that installing additional software to your SME Server'
echo 'may lead to potential security issues. Use this at YOUR OWN RISK!!'
echo '**********************************************************************'
echo ''
echo 'Do you accept the above warning and want to download SME Server dev-tools? Y/n'

read start

if [ "$start" = "n" ] ; then
    exit 1
fi
done

#architecture, uncomment the desired architecture
arch='i386'
#arch='x86_64'

#pentium='i586'
pentium='i686'

# Download mirrors, uncomment the mirror closest to your location.

#Europe
dl_mirror='ftp://ftp.nluug.nl/pub/os/Linux/distr/CentOS/4.1'
#dl_mirror='http://ftp.belnet.be/packages/centos/4.1/'
#dl_mirror='ftp://ftp.tu-chemnitz.de/pub/linux/centos/4.1/'
#dl_mirror='ftp://mirror.nsc.liu.se/CentOS/4.1/'

#North America
#dl_mirror='ftp://ftp.net.usf.edu/pub/centos/4.1/'
#dl_mirror='ftp://mirror.cs.wisc.edu/pub/mirrors/linux/centos/4.1/'
#dl_mirror='ftp://mirrors.jtlnet.com/centos/4.1/'
#dl_mirror='http://mirror.trouble-free.net/centos/4.1/'

#Asia
#dl_mirror='ftp://ftp.riken.jp/Linux/centos/4.1/'
#dl_mirror='http://ftp.hostrino.com/pub/centos/4.1/'
#dl_mirror='ftp://ftp2.tnc.edu.tw/pub1/centos/4.1/'

#Australia
#dl_mirror='ftp://ftp.planetmirror.com/pub/centos/4.1/'
#dl_mirror='http://mirror.pacific.net.au/linux/CentOS/4.1/'


mkdir -p devtools-7.0-CentOS-4.1
cd devtools-7.0-CentOS-4.1
echo ''
echo 'Downloading devtools-7.0. Please be patient, some files are big and your milage may vary...' | tee devtools-7.0.log
echo ''
echo '[----------------------------] progress indicator, downloading 29 packages.'
echo -n "["


#wget -nc -nd -S http://download.fedoralegacy.org/redhat/7.3/updates/i386/apache-devel-1.3.27-6.legacy.i386.rpm -a devtools-7.0.log
#echo -n "."
# Still trying to find out where to find apache-devel

wget -nc -nd -S $dl_mirror/os/$arch/CentOS/RPMS/anaconda-10.1.1.19-1.centos4.$arch.rpm -a devtools-7.0.log
echo -n "."
wget -nc -nd -S $dl_mirror/os/$arch/CentOS/RPMS/anaconda-runtime-10.1.1.19-1.centos4.$arch.rpm -a devtools-7.0.log
echo -n "."
wget -nc -nd -S $dl_mirror/os/$arch/CentOS/RPMS/autoconf-2.59-5.noarch.rpm -a devtools-7.0.log
echo -n "."
wget -nc -nd -S $dl_mirror/os/$arch/CentOS/RPMS/automake-1.9.2-3.noarch.rpm -a devtools-7.0.log
echo -n "."
wget -nc -nd -S $dl_mirror/os/$arch//CentOS/RPMS/bison-1.875c-2.$arch.rpm -a devtools-7.0.log
echo -n "."
wget -nc -nd -S $dl_mirror/os/$arch/CentOS/RPMS/cpp-3.4.3-22.1.$arch.rpm -a devtools-7.0.log
echo -n "."
wget -nc -nd -S $dl_mirror/os/$arch/CentOS/RPMS/e2fsprogs-devel-1.35-12.1.EL4.$arch.rpm -a devtools-7.0.log
echo -n "."
wget -nc -nd -S $dl_mirror/os/$arch/CentOS/RPMS/gcc-3.4.3-22.1.$arch.rpm -a devtools-7.0.log
echo -n "."
wget -nc -nd -S $dl_mirror/os/$arch/CentOS/RPMS/gcc-c++-3.4.3-22.1.$arch.rpm -a devtools-7.0.log
echo -n "."
wget -nc -nd -S $dl_mirror/os/$arch/CentOS/RPMS/glibc-devel-2.3.4-2.9.$arch.rpm -a devtools-7.0.log
echo -n "."
wget -nc -nd -S $dl_mirror/os/$arch/CentOS/RPMS/glibc-headers-2.3.4-2.9.$arch.rpm -a devtools-7.0.log
echo -n "."
wget -nc -nd -S $dl_mirror/os/$arch/CentOS/RPMS/glibc-kernheaders-2.4-9.1.87.$arch.rpm -a devtools-7.0.log
echo -n "."
wget -nc -nd -S $dl_mirror/os/$arch/CentOS/RPMS/kernel-sourcecode-2.6.9-11.EL.noarch.rpm -a devtools-7.0.log
echo -n "."
wget -nc -nd -S $dl_mirror/os/$arch/CentOS/RPMS/kernel-smp-devel-2.6.9-11.EL.$pentium.rpm -a devtools-7.0.log
echo -n "."
wget -nc -nd -S $dl_mirror/os/$arch/CentOS/RPMS/krb5-devel-1.3.4-12.$arch.rpm -a devtools-7.0.log
echo -n "."
wget -nc -nd -S $dl_mirror/os/$arch/CentOS/RPMS/libacl-devel-2.2.23-5.$arch.rpm -a devtools-7.0.log
echo -n "."
wget -nc -nd -S $dl_mirror/os/$arch/CentOS/RPMS/libattr-devel-2.4.16-3.$arch.rpm -a devtools-7.0.log
echo -n "."
wget -nc -nd -S $dl_mirror/os/$arch/CentOS/RPMS/libstdc++-devel-3.4.3-22.1.$arch.rpm -a devtools-7.0.log
echo -n "."
wget -nc -nd -S $dl_mirror/os/$arch/CentOS/RPMS/libtermcap-devel-2.0.8-39.$arch.rpm -a devtools-7.0.log
echo -n "."
wget -nc -nd -S $dl_mirror/os/$arch/CentOS/RPMS/libtool-1.5.6-4.EL4.1.$arch.rpm -a devtools-7.0.log
echo -n "."
wget -nc -nc -S $dl_mirror/os/$arch/CentOS/RPMS/m4-1.4.1-16.i386.rpm -a devtools-7.0.log
echo -n "."
wget -nc -nd -S $dl_mirror/os/$arch/CentOS/RPMS/mysqlclient10-3.23.58-4.RHEL4.1.$arch.rpm -a devtools-7.0.log
echo -n "."
wget -nc -nd -S $dl_mirror/os/$arch/CentOS/RPMS/ncurses-devel-5.4-13.$arch.rpm -a devtools-7.0.log
echo -n "."
wget -nc -nd -S $dl_mirror/os/$arch/CentOS/RPMS/openssl096b-0.9.6b-22.3.$arch.rpm -a devtools-7.0.log
echo -n "."
wget -nc -nd -S $dl_mirror/os/$arch/CentOS/RPMS/openssl-devel-0.9.7a-43.2.$arch.rpm -a devtools-7.0.log
echo -n "."
wget -nc -nd -S $dl_mirror/os/$arch/CentOS/RPMS/pam-devel-0.77-66.5.$arch.rpm -a devtools-7.0.log
echo -n "."
wget -nc -nd -S $dl_mirror/os/$arch/CentOS/RPMS/patch-2.5.4-20.$arch.rpm -a devtools-7.0.log
echo -n "."
wget -nc -nd -S $dl_mirror/os/$arch/CentOS/RPMS/readline-devel-4.3-13.$arch.rpm -a devtools-7.0.log
echo -n "."
wget -nc -nd -S $dl_mirror/updates/$arch/RPMS/zlib-devel-1.2.1.2-1.1.$arch.rpm -a devtools-7.0.log
echo -n "] files downloading complete, checking for any errors..."
echo ''

IS_ERROR=`pic devtools-7.0.log | grep -c ERROR`

if [ $IS_ERROR -ge 1 ] ; then
cp devtools-7.0.log ../devtools-7.0-ERROR.log
cd ..
echo '' >> devtools-7.0-ERROR.log
echo '********* NOTE ADDED BY THE "download_devtools-7.0" SCIPT ***********' >> devtools-7.0-ERROR.log
echo 'The download was not completely succesfull. For security reasons the (partial) downloaded files have been removed.' >> devtools-7.0-ERROR.log
echo 'Check the above log entries to see what is wrong or go the documentation or forums over at http://forums.contribs.org.' >> devtools-7.0-ERROR.log
echo '' >> devtools-7.0-ERROR.log
echo 'Sorry :-('  >> devtools-7.0-ERROR.log
#rm -rf devtools-7.0
echo ''
echo ''
echo '************************************************************************'
echo '*                        !!!!!! WARNING !!!!!!                         *'
echo '************************************************************************'
echo ''
echo 'The download of devtools-7.0 is NOT complete or incorrect. For security'
echo 'reasons the (partial) donwloaded files have been deleted. Check the'
echo '"devtools-7.0-ERROR.log" in this directory and find out what is going on'
echo 'or seek help in the documentation or forums on http://forums.contribs.org.'
echo ''
echo 'Exiting due to ERROR(S) :-('
echo ''
exit 1
fi

echo ''
echo ''
echo 'All files have been downloaded succesfully. To INSTALL devtools-7.0'
echo 'change to the "/devtools-7.0/" directory and enter the following'
echo 'command as root "rpm -Uvh --nodeps *.rpm"'
echo ''
echo 'Have a nice day ;-)'
echo ''
echo ''

---> Do not include this line