Update:
[ipfire-2.x.git] / make.sh
diff --git a/make.sh b/make.sh
index 31c5a4c..9fdf9fd 100644 (file)
--- a/make.sh
+++ b/make.sh
 
   NAME="IPFire"                        # Software name
   SNAME="ipfire"                       # Short name
-  VERSION="1.4"                        # Version number
-# PREVIOUSTAG=IPCOP_v1_4_10_FINAL
-  SLOGAN="We secure your network"      # Software slogan
+  VERSION="2.0"                        # Version number
+  SLOGAN="www.ipfire.org"              # Software slogan
   CONFIG_ROOT=/var/ipfire              # Configuration rootdir
   NICE=10
-  MAX_RETRIES=3                                # prefetch/check loop
+  MAX_RETRIES=3                        # prefetch/check loop
   KVER=`grep --max-count=1 VER lfs/linux | awk '{ print $3 }'`
   MACHINE=`uname -m`
+  SVN_REVISION=`svn info | grep Revision | cut -c 11-`
+
+  # Setzen des IPFire Builds
+  if [ -e ./.svn ]; then
+    FIREBUILD=`cat .svn/entries |sed -n 's/^[ \t]*revision=\"// p' | sed -n 's/\".*$// p'`
+  fi
 
   # Debian specific settings
   if [ ! -e /etc/debian_version ]; then
@@ -46,7 +51,6 @@
        fi
   fi
 
-
   PWD=`pwd`
   BASENAME=`basename $0`
   BASEDIR=`echo $FULLPATH | sed "s/\/$BASENAME//g"`
   DIR_CHK=$BASEDIR/cache/check
   mkdir $BASEDIR/log/ 2>/dev/null
 
+  if [ -f .config ]; then
+       . .config
+  fi
+
   if [ 'x86_64' = $MACHINE -o 'i686' = $MACHINE -o 'i586' = $MACHINE -o 'i486' = $MACHINE -o 'i386' = $MACHINE ]; then
-       echo "`date -u '+%b %e %T'`: Machine is ix86 (or equivalent)" | tee -a $LOGFILE
+       echo "`date -u '+%b %e %T'`: Machine is ix86 (or equivalent)" >> $LOGFILE
        MACHINE=i386
        BUILDTARGET=i386-pc-linux-gnu
        CFLAGS="-O2 -mcpu=i386 -march=i386 -pipe -fomit-frame-pointer"
        CXXFLAGS="-O2 -mcpu=i386 -march=i386 -pipe -fomit-frame-pointer"
   elif [ 'alpha' = $MACHINE ]; then
-       echo "`date -u '+%b %e %T'`: Machine is Alpha AXP" | tee -a $LOGFILE
+       echo "`date -u '+%b %e %T'`: Machine is Alpha AXP" >> $LOGFILE
        BUILDTARGET=alpha-unknown-linux-gnu
        CFLAGS="-O2 -mcpu=ev4 -mieee -pipe"
        CXXFLAGS="-O2 -mcpu=ev4 -mieee -pipe"
   else
-       echo "`date -u '+%b %e %T'`: Can't determine your architecture - $MACHINE" | tee -a $LOGFILE
+       echo "`date -u '+%b %e %T'`: Can't determine your architecture - $MACHINE" >> $LOGFILE
        exit 1
   fi
 
@@ -336,8 +344,8 @@ ipcopmake() {
 
 ipfiredist() {
        if [ -f $BASEDIR/build/usr/src/lfs/$1 ]; then
+#         if [ ! `ls -w1 $BASEDIR/packages/*.tar.gz | grep $1` ]; then
                echo "`date -u '+%b %e %T'`: Packaging $1" | tee -a $LOGFILE
-               cp -f $BASEDIR/src/scripts/make-packages.sh $BASEDIR/build/usr/sbin/
                chroot $LFS /tools/bin/env -i   HOME=/root \
                                                TERM=$TERM PS1='\u:\w\$ ' \
                                                PATH=/usr/local/bin:/bin:/usr/bin:/sbin:/usr/sbin \
@@ -353,15 +361,12 @@ ipfiredist() {
                if [ $? -ne 0 ]; then
                        exiterror "Packaging $1"
                fi
+#         else
+#              echo "`date -u '+%b %e %T'`: Packaging: The package $1 already exists"
+#         fi
        else
                exiterror "No such file or directory: $BASEDIR/build/usr/src/lfs/$1"
        fi
-       if [ -e $BASEDIR/packages ]; then
-               mv -f $BASEDIR/build/paks/* $BASEDIR/packages/
-       else
-               mkdir -p $BASEDIR/packages
-               mv -f $BASEDIR/build/paks/* $BASEDIR/packages/
-       fi
        return 0
 }
 
@@ -509,8 +514,8 @@ buildbase() {
 }
 
 buildipcop() {
-  # Run IPCop make scripts one by one
-  LOGFILE="$BASEDIR/log/_build.ipcop.log"
+  # Run IPFire make scripts one by one
+  LOGFILE="$BASEDIR/log/_build.ipfire.log"
   export LOGFILE
   echo -ne "`date -u '+%b %e %T'`: Stage3 $NAME build \n" | tee -a $LOGFILE
 
@@ -529,8 +534,8 @@ buildipcop() {
   if [ 'i386' = $MACHINE ]; then 
        # abuse the SMP flag, and make an minimal installer kernel first
        # so that the boot floppy always works.....
-       ipcopmake linux         LFS_PASS=ipcop SMP=installer
-       ipcopmake linux         LFS_PASS=ipcop SMP=1
+       ipcopmake linux         LFS_PASS=ipfire SMP=installer
+       ipcopmake linux         LFS_PASS=ipfire SMP=1
        ipcopmake 3cp4218       SMP=1
        ipcopmake amedyn        SMP=1
        ipcopmake cxacru        SMP=1
@@ -544,11 +549,14 @@ buildipcop() {
        ipcopmake fcdslsl       SMP=1
        ipcopmake fcdslusb      SMP=1
        ipcopmake fcdslslusb    SMP=1
+       ipcopmake fcpci SMP=1
+       ipcopmake fcclassic     SMP=1
        ipcopmake pulsar        SMP=1
        ipcopmake unicorn       SMP=1
+       ipcopmake promise-sata-300-tx SMP=1
   fi
 
-  ipcopmake linux      LFS_PASS=ipcop
+  ipcopmake linux      LFS_PASS=ipfire
   ipcopmake 3cp4218    
   ipcopmake amedyn     
   ipcopmake cxacru     
@@ -563,9 +571,12 @@ buildipcop() {
        ipcopmake fcdsl2        
        ipcopmake fcdslsl       
        ipcopmake fcdslusb      
-       ipcopmake fcdslslusb    
-       ipcopmake pulsar        
-       ipcopmake unicorn       
+       ipcopmake fcdslslusb 
+       ipcopmake fcpci
+       ipcopmake fcclassic
+       ipcopmake pulsar        
+       ipcopmake unicorn
+       ipcopmake promise-sata-300-tx
   fi
 
   ipcopmake pcmcia-cs
@@ -605,6 +616,7 @@ buildipcop() {
   ipcopmake iproute2
   ipcopmake iptstate
   ipcopmake iputils
+  ipcopmake l7-protocols
   ipcopmake isapnptools
   ipcopmake isdn4k-utils
   ipcopmake kudzu
@@ -627,6 +639,21 @@ buildipcop() {
   ipcopmake Net-DNS
   ipcopmake Net-IPv4Addr
   ipcopmake Net_SSLeay
+  ipcopmake IO-Stringy
+  ipcopmake Unix-Syslog
+  ipcopmake Mail-Tools
+  ipcopmake MIME-Tools
+  ipcopmake Net-Server
+  ipcopmake Convert-TNEF
+  ipcopmake Convert-UUlib
+  ipcopmake Archive-Tar
+  ipcopmake Archive-Zip
+  ipcopmake Text-Tabs+Wrap
+  ipcopmake Locale-Country
+  ipcopmake GeoIP
+  ipcopmake fwhits
+  ipcopmake berkeley
+  ipcopmake BerkeleyDB ## The Perl module
   ipcopmake noip_updater
   ipcopmake ntp
   ipcopmake oinkmaster
@@ -638,46 +665,100 @@ buildipcop() {
   ipcopmake setup
   ipcopmake snort
   #ipcopmake speedycgi
+  ipcopmake saslauthd PASS=1
+  ipcopmake openldap
   ipcopmake squid
   ipcopmake squid-graph
+  ipcopmake squidguard
   ipcopmake tcpdump
   ipcopmake traceroute
   ipcopmake vlan
-  ipcopmake wireless
+  #ipcopmake wireless
   ipcopmake libsafe
   ipcopmake 3c5x9setup
-  echo -ne "`date -u '+%b %e %T'`: Building IPFire modules \n" | tee -a $LOGFILE
+#  echo -ne "`date -u '+%b %e %T'`: Building ### IPFire modules ### \n" | tee -a $LOGFILE
+  ipcopmake pakfire
+  ipcopmake startscripts
 ## Zuerst die Libs und dann die Programme. Ordnung muss sein!
-  ipcopmake berkeley-DB
+  ipcopmake java
   ipcopmake libtiff
+  ipcopmake libjpeg
+  ipcopmake lcms
+  ipcopmake libmng
+  ipcopmake freetype
+  ipcopmake bootsplash
   ipcopmake libxml2
   ipcopmake spandsp
   ipcopmake lzo
+  ipcopmake openvpn
   ipcopmake pkg-config
   ipcopmake glib
   ipcopmake xampp
   ipcopmake pam
   ipcopmake pammysql
+  ipcopmake saslauthd PASS=2
+  ipcopmake xinetd
+  ipcopmake ghostscript
+  ipcopmake cups
+#  ipcopmake lpd ## Im Moment aus, da CUPS vorhanden ist.
+  ipcopmake samba
   ipcopmake sudo
   ipcopmake mc
-  ipcopmake pwlib
-  ipcopmake openh323
-  ipcopmake xinetd
+#  ipcopmake pwlib
+#  ipcopmake openh323
   ipcopmake wget
+  ipcopmake wput
   ipcopmake bridge-utils
-  ipcopmake saslauthd PASS=1
-  ipcopmake openldap
-  ipcopmake saslauthd PASS=2
-  ipcopmake samba
+  ipcopmake screen
+  ipcopmake hddtemp
+  ipcopmake smartmontools
+  ipcopmake htop
+  ipcopmake lynx
+  echo -ne "`date -u '+%b %e %T'`: Building ### Mailserver ### \n" | tee -a $LOGFILE
   ipcopmake postfix
+  ipcopmake procmail
+  ipcopmake fetchmail
+  ipcopmake cyrusimap
+  ipcopmake web-cyradm
+  ipcopmake mailx
+  ipcopmake clamav
+  ipcopmake razor
+  ipcopmake spamassassin
+#  ipcopmake amavisd
+  echo -ne "`date -u '+%b %e %T'`: Building ### VoIP-Server ### \n" | tee -a $LOGFILE
   ipcopmake stund
-  ipcopmake lpd
-  ipcopmake openvpn
+  ipcopmake zaptel
+  ipcopmake libpri
+  ipcopmake bristuff
   ipcopmake asterisk
-  ipcopmake edonkeyclc
-#  wget http://www.guzu.net/linux/hddtemp.db && mv hddtemp.db $BASEDIR/build/etc/hddtemp.db
-#  ipcopmake hddtemp
-# ipcopmake stunnel # Ausgeschaltet, weil wir es doch nicht nutzen
+  ipcopmake mpg123
+  echo -ne "`date -u '+%b %e %T'`: Building ### MP3-Server ### \n" | tee -a $LOGFILE
+  ipcopmake libogg
+  ipcopmake libvorbis
+  ipcopmake lame
+  ipcopmake sox
+  ipcopmake gnump3d
+  echo -ne "`date -u '+%b %e %T'`: Building ### P2P-Clients ### \n" | tee -a $LOGFILE
+  ipcopmake applejuice
+  ipcopmake ocaml
+  ipcopmake mldonkey
+#  ipcopmake edonkeyclc
+#  ipcopmake sane
+  echo -ne "`date -u '+%b %e %T'`: Building ### Net-Tools ### \n" | tee -a $LOGFILE
+  ipcopmake ntop
+#  ipcopmake rsync
+  ipcopmake tcpwrapper
+  ipcopmake portmap
+  ipcopmake nfs
+  ipcopmake nmap
+  ipcopmake mbmon
+  ipcopmake iftop
+  ipcopmake ncftp
+  ipcopmake cftp
+  ipcopmake etherwake
+  ipcopmake ethereal
+  ipcopmake tftp-hpa
+#  ipcopmake stunnel # Ausgeschaltet, weil wir es doch nicht nutzen
 }
 
 buildinstaller() {
@@ -717,7 +798,7 @@ buildpackages() {
   echo "`date -u '+%b %e %T'`: Stripping files" | tee -a $LOGFILE
   find $LFS/lib $LFS/usr/lib $LFS/usr/share/rrdtool-* $LFS/install ! -type l \( -name '*.so' -o -name '*.so[\.0-9]*' \) \
        ! -name 'libc.so' ! -name 'libpthread.so' ! -name 'libcrypto.so.0.9.7.sha1' \
-       -ls -exec $LFS/tools/bin/strip --strip-all {} \; >> $LOGFILE 2>&1
+        -exec $LFS/tools/bin/strip --strip-all {} \; >> $LOGFILE 2>&1
   # add -ls before -exec if you want to verify what files are stripped
 
   find $LFS/{,s}bin $LFS/usr/{,s}bin $LFS/usr/local/{,s}bin ! -type l \
@@ -740,13 +821,6 @@ buildpackages() {
        rm -f $LFS/license.txt >> $LOGFILE 2>&1
        cd $BASEDIR
   fi
-
-#  Create update for this version
-#  echo "`date -u '+%b %e %T'`: Building update $VERSION tgz" | tee -a $LOGFILE
-#  tar -cz -C $BASEDIR/build --files-from=$BASEDIR/updates/$VERSION/ROOTFILES.$MACHINE-$VERSION -f $BASEDIR/updates/$VERSION/patch.tar.gz --exclude='#*'; 
-#  chmod 755 $BASEDIR/updates/$VERSION/setup
-#  tar -cz -C $BASEDIR/updates/$VERSION -f $LFS/install/images/$SNAME-update-$VERSION.$MACHINE.tgz patch.tar.gz setup information
-#  rm -f $LFS/var/run/{need-depmod-$KVER,need-depmod-$KVER-smp}
   
   # Generating list of packages used
   echo "`date -u '+%b %e %T'`: Generating packages list from logs" | tee -a $LOGFILE
@@ -757,23 +831,18 @@ buildpackages() {
        fi
   done
   echo "====== List of softwares used to build $NAME Version: $VERSION ======" > $BASEDIR/doc/packages-list.txt
-  grep -v 'configroot$\|img$\|initrd$\|initscripts$\|installer$\|install$\|ipcop$\|setup$\|stage2$\|smp$\|tools$\|tools1$\|tools2$' \
+  grep -v 'configroot$\|img$\|initrd$\|initscripts$\|installer$\|install$\|ipfire$\|setup$\|pakfire$\|stage2$\|smp$\|tools$\|tools1$\|tools2$\|^ipfire-logs' \
        $BASEDIR/doc/packages-list | sort >> $BASEDIR/doc/packages-list.txt
   rm -f $BASEDIR/doc/packages-list
   # packages-list.txt is ready to be displayed for wiki page
 
   # Create ISO for CDRom and USB-superfloppy
   ipcopmake cdrom
+  rm -f $LFS/install/images/*usb*
   cp $LFS/install/images/{*.iso,*.tgz} $BASEDIR >> $LOGFILE 2>&1
 
-  # Build IPFire packages
-  ipfiredist libtiff
-  ipfiredist libxml2
-  ipfiredist mc
-  ipfiredist postfix
-  ipfiredist spandsp
-  ipfiredist sudo
-  ipfiredist xinetd
+  ipfirepackages
+
   # Cleanup
   stdumount
   rm -rf $BASEDIR/build/tmp/*
@@ -794,11 +863,51 @@ buildpackages() {
 
 }
 
+ipfirepackages() {
+  if [ -d "$BASEDIR/packages" ]; then
+         for i in `ls $BASEDIR/packages`; do
+               touch $BASEDIR/build/install/packages/$i.empty
+         done
+  fi
+  ipfiredist amavisd
+  ipfiredist applejuice
+  ipfiredist asterisk
+  ipfiredist clamav
+  ipfiredist cups
+  ipfiredist cyrusimap
+  ipfiredist fetchmail
+  ipfiredist gnump3d
+  ipfiredist java
+  ipfiredist lame
+  ipfiredist libtiff
+  ipfiredist libxml2
+  ipfiredist mailx
+  ipfiredist mldonkey
+  ipfiredist nfs
+  ipfiredist nmap
+  ipfiredist ntop
+  ipfiredist postfix
+  ipfiredist procmail
+  ipfiredist samba
+  ipfiredist spamassassin
+  ipfiredist web-cyradm
+  ipfiredist xampp
+#  ipfiredist xinetd
+  test -d $BASEDIR/packages || mkdir $BASEDIR/packages
+  mv -f $LFS/install/packages/*.{tar.gz,md5} $BASEDIR/packages >> $LOGFILE 2>&1
+  rm -rf  $BASEDIR/build/install/packages/*
+}
+
+update_logs() {
+       tar cfz log/ipfire-logs-`date +'%Y-%m-%d-%H:%M'`.tgz log/_build.*
+       rm -f log/_build.*
+}
+
 # See what we're supposed to do
 case "$1" in 
 build)
        BUILDMACHINE=`uname -m`
-       PACKAGE=`ls -v -r $BASEDIR/cache/$SNAME-1.4.*-toolchain-$BUILDMACHINE.tar.gz 2> /dev/null | head -n 1`
+       PACKAGE=`ls -v -r $BASEDIR/cache/toolchains/$SNAME-$VERSION-toolchain-$BUILDMACHINE.tar.gz 2> /dev/null | head -n 1`
        #only restore on a clean disk
        if [ ! -f log/perl-*-tools ]; then
                if [ ! -n "$PACKAGE" ]; then
@@ -819,8 +928,17 @@ build)
                echo "`date -u '+%b %e %T'`: Using installed toolchain" | tee -a $LOGFILE
                prepareenv
        fi
+
        buildbase
        buildipcop
+
+       # Setzen des IPFire Builds
+       if [ "$FIREBUILD" ]; then
+               echo "$FIREBUILD" > $BASEDIR/build/var/ipfire/firebuild
+       else
+               echo "_(OvO)_" > $BASEDIR/build/var/ipfire/firebuild
+       fi
+
        buildinstaller
        buildpackages
        ;;
@@ -831,20 +949,9 @@ shell)
        entershell
        ;;
 changelog)
-       echo "Building doc/Changelog from CVS"
-       # cv2cl script come from http://www.red-bean.com/cvs2cl/
-       if [ ! -s $BASEDIR/doc/CVS/Tag ]; then
-               BRANCHOPTS=""
-       else
-               BRANCH=`cat $BASEDIR/doc/CVS/Tag`
-               BRANCH=${BRANCH:1}
-               BRANCHOPTS="--follow-only $BRANCH"
-       fi
-       
-       $BASEDIR/tools/cvs2cl.pl --gmt --show-dead $BRANCHOPTS -f $BASEDIR/doc/ChangeLog
-       rm -f $BASEDIR/doc/ChangeLog.bak
-       echo
-       echo "Commit the change now to update CVS"
+       echo -n "Loading new Changelog from SVN: "
+       svn log http://svn.ipfire.eu/svn/ipfire > doc/ChangeLog
+       echo "Finished!"
        ;;
 check)
        echo "Checking sources files availability on the web"
@@ -892,55 +999,12 @@ clean)
        done
        rm -rf $BASEDIR/build
        rm -rf $BASEDIR/cdrom
+       rm -rf $BASEDIR/packages
        rm -rf $BASEDIR/log
-       rm -f $BASEDIR/updates/$VERSION/patch.tar.gz;
        if [ -h /tools ]; then
                rm -f /tools
        fi
        ;;
-dist)
-       echo "Building source package from CVS, list of changed files, MD5 of release files"
-       if [ ! -s $BASEDIR/doc/CVS/Tag ]; then
-               BRANCH=""
-               BRANCHOPTS="-D `date +'%Y-%m-%d'`"
-       else
-               BRANCH=`cat $BASEDIR/doc/CVS/Tag`
-               BRANCH=${BRANCH:1}
-               BRANCHOPTS="-r $BRANCH"
-       fi
-
-       rm -rf $BASEDIR/build/tmp/$SNAME-$VERSION $BASEDIR/doc/release.txt
-       cd $BASEDIR/build/tmp
-       # build sources tgz
-       echo "Export tree $BRANCH $SNAME-$VERSION"
-       cvs -z3 -d `cat $BASEDIR/CVS/Root` export $BRANCHOPTS ipcop
-       if [ $? -eq 0 ]; then
-               mv ipcop $SNAME-$VERSION
-               tar cfz $BASEDIR/$SNAME-sources-$VERSION.tgz $SNAME-$VERSION
-               cd $BASEDIR
-
-               if [ ! -d $BASEDIR/build/tmp/$PREVIOUSTAG ]; then
-                       # export previous version to be compared with actual, this help to check wich files need to go in update
-                       cd $BASEDIR/build/tmp
-                       echo "Export tree $PREVIOUSTAG"
-                       cvs -z3 -d `cat $BASEDIR/CVS/Root` export -r $PREVIOUSTAG ipcop
-                       mv ipcop $PREVIOUSTAG
-               fi
-               if [ -d $BASEDIR/build/tmp/$PREVIOUSTAG -o -d $BASEDIR/build/tmp/$SNAME-$VERSION ]; then
-                       cd $BASEDIR/build/tmp
-                       echo "diff $PREVIOUSTAG <> $BRANCH $SNAME-$VERSION >doc/updated-sources.txt"
-                       diff -rq $PREVIOUSTAG $SNAME-$VERSION > $BASEDIR/doc/updated-sources.txt
-                       mv $BASEDIR/doc/updated-sources.txt $BASEDIR/doc/updated-sources.bak
-                       sed -e "s+Files $PREVIOUSTAG\/++" \
-                               -e "s+ and .*$++" \
-                               -e "s+src/rc.d+etc/rc.d+" \
-                               -e "s+^langs/+var/ipcop/langs/+" \
-                               -e "s+html/cgi-bin+home/httpd/cgi-bin+" $BASEDIR/doc/updated-sources.bak \
-                               > $BASEDIR/doc/updated-sources.txt
-                       rm -f $BASEDIR/doc/updated-sources.bak
-               fi
-       fi
-       ;;
 newpak)
        # create structure for a new package
        echo -e "Name of the new package: $2"
@@ -952,7 +1016,6 @@ newpak)
                cp $BASEDIR/lfs/postfix $BASEDIR/lfs/$2
 
                touch ROOTFILES
-               touch CONFFILES
                touch {,un}install.sh
        ## install.sh
                echo '#!/bin/bash' > install.sh
@@ -1037,80 +1100,531 @@ prefetch)
        fi
        cd -
        ;;
-rootfiles)
-       PREVIOUSVERSION=`echo $PREVIOUSTAG | sed -e 's/IPCOP_v//' -e 's/_FINAL//' -e 's/_/\./g'`
-       # make md5 list of actual build
-       # some packages include a timestamp (kernel/perl/python/vim and more), so md5 vary at each build
-       # anyway, it is sometime usable after a patch or a minor upgrade to know wich files include in update
-       if [ ! -f "$BASEDIR/build/install/cdrom/$SNAME-$VERSION.tgz" ]; then
-               echo "need cdrom be build to read include files list, use ./make.sh build before."
-       else
-               tar tzf $BASEDIR/build/install/cdrom/$SNAME-$VERSION.tgz > $BASEDIR/updates/$VERSION/FILES.tmp
-               cd $BASEDIR/build
-               rm -f $BASEDIR/updates/$VERSION/FILES-$MACHINE-$VERSION.md5
-               for line in `cat $BASEDIR/updates/$VERSION/FILES.tmp`; do
-                       if [ -f "$line" -a ! -L "$line" ]; then
-                               md5sum "$line" >> $BASEDIR/updates/$VERSION/FILES-$MACHINE-$VERSION.md5
-                       fi
-               done
-               diff $BASEDIR/updates/$PREVIOUSVERSION/FILES-$MACHINE-$PREVIOUSVERSION.md5 \
-                       $BASEDIR/updates/$VERSION/FILES-$MACHINE-$VERSION.md5 \
-                       > $BASEDIR/updates/$VERSION/FILES-$MACHINE.diff
-               awk '$1==">" {print $3}' $BASEDIR/updates/$VERSION/FILES-$MACHINE.diff \
-                       > $BASEDIR/updates/$VERSION/ROOTFILES.add.$MACHINE
-               awk '$1=="<" {print $3}' $BASEDIR/updates/$VERSION/FILES-$MACHINE.diff \
-                       > $BASEDIR/updates/$VERSION/ROOTFILES.remove.$MACHINE.tmp
-               rm -f $BASEDIR/updates/$VERSION/ROOTFILES.remove.$MACHINE
-               for line in `cat $BASEDIR/updates/$VERSION/ROOTFILES.remove.$MACHINE.tmp`; do
-                       # a file is only removed when not in add file
-                       if ( ! grep -q "^$line$" $BASEDIR/updates/$VERSION/ROOTFILES.add.$MACHINE ); then
-                               echo $line >> $BASEDIR/updates/$VERSION/ROOTFILES.remove.$MACHINE
-                       fi
-               done
-               rm -f $BASEDIR/updates/$VERSION/{FILES.tmp,FILES-*.diff,ROOTFILES.remove.*.tmp}
-       fi
-       exit 0
-       ;;
 toolchain)
        prepareenv
        buildtoolchain
        BUILDMACHINE=`uname -m`
        echo "`date -u '+%b %e %T'`: Create toolchain tar.gz for $BUILDMACHINE" | tee -a $LOGFILE
-       cd $BASEDIR && tar -zc --exclude='log/_build.*.log' -f cache/$SNAME-$VERSION-toolchain-$BUILDMACHINE.tar.gz \
+       test -d $BASEDIR/cache/toolchains || mkdir $BASEDIR/cache/toolchains
+       cd $BASEDIR && tar -zc --exclude='log/_build.*.log' -f cache/toolchains/$SNAME-$VERSION-toolchain-$BUILDMACHINE.tar.gz \
                build/{bin,etc,usr/bin,usr/local} \
                build/tools/{bin,etc,*-linux-gnu,include,lib,libexec,sbin,share,var} \
                log >> $LOGFILE
-       md5sum cache/$SNAME-$VERSION-toolchain-$BUILDMACHINE.tar.gz \
-               > cache/$SNAME-$VERSION-toolchain-$BUILDMACHINE.md5
+       md5sum cache/toolchains/$SNAME-$VERSION-toolchain-$BUILDMACHINE.tar.gz \
+               > cache/toolchains/$SNAME-$VERSION-toolchain-$BUILDMACHINE.md5
        stdumount
        ;;
 gettoolchain)
        BUILDMACHINE=`uname -m`
        # arbitrary name to be updated in case of new toolchain package upload
-       PACKAGE=$SNAME-1.4-toolchain-$BUILDMACHINE
-       URL_IPFIRE=`grep URL_IPFIRE lfs/Config | awk '{ print $3 }'`
-       echo "`date -u '+%b %e %T'`: Load toolchain tar.gz for $BUILDMACHINE" | tee -a $LOGFILE
-       cd $BASEDIR/cache
-       wget -c $URL_IPFIRE/toolchains/$PACKAGE.tar.gz $URL_IPFIRE/toolchains/$PACKAGE.md5
-       if [ $? -ne 0 ]; then
-               echo "`date -u '+%b %e %T'`: error downloading toolchain for $BUILDMACHINE machine" | tee -a $LOGFILE
+       PACKAGE=$SNAME-$VERSION-toolchain-$BUILDMACHINE
+       if [ ! -f $BASEDIR/cache/toolchains/$PACKAGE.tar.gz ]; then
+               URL_IPFIRE=`grep URL_IPFIRE lfs/Config | awk '{ print $3 }'`
+               test -d $BASEDIR/cache/toolchains || mkdir $BASEDIR/cache/toolchains
+               echo "`date -u '+%b %e %T'`: Load toolchain tar.gz for $BUILDMACHINE" | tee -a $LOGFILE
+               cd $BASEDIR/cache/toolchains
+               wget $URL_IPFIRE/toolchains/$PACKAGE.tar.gz $URL_IPFIRE/toolchains/$PACKAGE.md5 >& /dev/null
+               if [ $? -ne 0 ]; then
+                       echo "`date -u '+%b %e %T'`: error downloading toolchain for $BUILDMACHINE machine" | tee -a $LOGFILE
+               else
+                       if [ "`md5sum $PACKAGE.tar.gz | awk '{print $1}'`" = "`cat $PACKAGE.md5 | awk '{print $1}'`" ]; then
+                               echo "`date -u '+%b %e %T'`: toolchain md5 ok" | tee -a $LOGFILE
+                       else
+                               exiterror "$PACKAGE.md5 did not match, check downloaded package"
+                       fi
+               fi
+       else
+               echo "Toolchain is already downloaded. Exiting..."
+       fi
+       ;;
+sources-iso)
+       prepareenv
+       echo "`date -u '+%b %e %T'`: Build sources iso for $MACHINE" | tee -a $LOGFILE
+       chroot $LFS /tools/bin/env -i   HOME=/root \
+       TERM=$TERM PS1='\u:\w\$ ' \
+       PATH=/usr/local/bin:/bin:/usr/bin:/sbin:/usr/sbin \
+       VERSION=$VERSION NAME="$NAME" SNAME="$SNAME" MACHINE=$MACHINE \
+       /bin/bash -x -c "cd /usr/src/lfs && make -f sources-iso LFS_BASEDIR=/usr/src install" >>$LOGFILE 2>&1
+       mv $LFS/install/images/ipfire-* $BASEDIR >> $LOGFILE 2>&1
+       stdumount
+       ;;
+svn)
+       case "$2" in
+         update|up)
+               # clear
+               echo -n "Load the latest source files..."
+               svn update >> $PWD/log/_build.svn.update.log
+               if [ $? -eq 0 ]; then
+                       echo ".Done!"
+               else
+                       echo ".Fail!"
+                       exit 1
+               fi
+               echo -n "Write the svn info to a file..."
+               svn info > $PWD/svn_status
+               if [ "$?" -eq "0" ]; then
+                       echo ".Done!"
+               else
+                       echo ".Fail!"
+                       exit 1
+               fi
+               chmod 755 $0
+               exit 0
+         ;;
+         commit|ci)
+               clear
+               #$0 changelog
+               #echo "Upload the changed files..."
+               sleep 1
+               svn commit
+               $0 svn up
+         ;;
+         dist)
+               $0 svn up
+               echo -ne "Download source package from svn..."
+               svn export http://svn.ipfire.eu/svn/ipfire ipfire-source/ --force > /dev/null
+               if [ "$?" -eq "0" ]; then
+                       echo ".Done!"
+               else
+                       echo ".Fail!"
+                       exit 1
+               fi
+               echo -n "Compress files..."
+               tar cfz ipfire-source-`date +'%Y-%m-%d'`-r`svn info | grep Revision | cut -c 11-`.tar.gz ipfire-source
+               if [ "$?" -eq "0" ]; then
+                       echo ".Done!"
+               else
+                       echo ".Fail!"
+                       exit 1
+               fi
+               echo -n "Cleanup..."
+               rm ipfire-source/ -r
+               if [ "$?" -eq "0" ]; then
+                       echo ".Done!"
+               else
+                       echo ".Fail!"
+                       exit 1
+               fi
+         ;;
+         diff)
+               echo -ne "Make a local diff to last svn revision..."
+               svn diff > ipfire-diff-`date +'%Y-%m-%d-%H:%M'`-r`svn info | grep Revision | cut -c 11-`.diff
+               if [ "$?" -eq "0" ]; then
+                       echo ".Done!"
+               else
+                       echo ".Fail!"
+                       exit 1
+               fi
+               echo "Diff was successfully saved to ipfire-diff-`date +'%Y-%m-%d-%H:%M'`-r`svn info | grep Revision | cut -c 11-`.diff"
+         ;;
+       esac
+       ;;
+make-config)
+       echo -e "This is for creating your configuration..."
+       echo -e "We will need some input:"
+       echo -e ""
+       echo -n "FTP-DOMAIN FOR THE ISO: "
+       read IPFIRE_FTP_URL_EXT
+       echo -n "PATH FOR $IPFIRE_FTP_URL_EXT: "
+       read IPFIRE_FTP_PATH_EXT
+       echo -n "USERNAME FOR $IPFIRE_FTP_URL_EXT: "
+       read IPFIRE_FTP_USER_EXT
+       echo -n "PASSWORD FOR $IPFIRE_FTP_URL_EXT: "
+       read -s IPFIRE_FTP_PASS_EXT
+       echo ""
+       echo "(You can leave this empty if the cache-server is the same as your iso-server.)"
+       echo -n "FTP-DOMAIN FOR THE CACHE: "
+       read IPFIRE_FTP_URL_INT
+       echo -n "PATH FOR $IPFIRE_FTP_URL_INT: "
+       read IPFIRE_FTP_PATH_INT
+       if [ $IPFIRE_FTP_URL_INT ]; then
+               echo -n "USERNAME FOR $IPFIRE_FTP_URL_INT: "
+               read IPFIRE_FTP_USER_INT
+               echo -n "PASSWORD FOR $IPFIRE_FTP_URL_INT: "
+               read -s IPFIRE_FTP_PASS_INT
+       else
+               IPFIRE_FTP_URL_INT=$IPFIRE_FTP_URL_EXT
+               IPFIRE_FTP_USER_INT=$IPFIRE_FTP_USER_EXT
+               IPFIRE_FTP_PASS_INT=$IPFIRE_FTP_PASS_EXT
+               echo "USERNAME FOR $IPFIRE_FTP_URL_INT: $IPFIRE_FTP_USER_INT"
+               echo "PASSWORD FOR $IPFIRE_FTP_URL_INT: !HIDDEN!"
+       fi
+       echo ""
+       echo "(You can leave this empty if the pak-server is the same as your iso-server.)"
+       echo -n "FTP-DOMAIN FOR THE PAKS: "
+       read IPFIRE_FTP_URL_PAK
+       echo -n "PATH FOR $IPFIRE_FTP_URL_PAK: "
+       read IPFIRE_FTP_PATH_PAK
+       if [ $IPFIRE_FTP_URL_PAK ]; then
+               echo -n "USERNAME FOR $IPFIRE_FTP_URL_PAK: "
+               read IPFIRE_FTP_USER_PAK
+               echo -n "PASSWORD FOR $IPFIRE_FTP_URL_PAK: "
+               read -s IPFIRE_FTP_PASS_PAK
        else
-               if [ "`md5sum $PACKAGE.tar.gz | awk '{print $1}'`" = "`cat $PACKAGE.md5 | awk '{print $1}'`" ]; then
-                       echo "`date -u '+%b %e %T'`: toolchain md5 ok" | tee -a $LOGFILE
-                       echo "`date -u '+%b %e %T'`: Uncompressing toolchain" | tee -a $LOGFILE
-                       cd $BASEDIR && tar xvfz cache/$PACKAGE.tar.gz -C .
+               IPFIRE_FTP_URL_PAK=$IPFIRE_FTP_URL_EXT
+               IPFIRE_FTP_USER_PAK=$IPFIRE_FTP_USER_EXT
+               IPFIRE_FTP_PASS_PAK=$IPFIRE_FTP_PASS_EXT
+               echo "USERNAME FOR $IPFIRE_FTP_URL_PAK: $IPFIRE_FTP_USER_PAK"
+               echo "PASSWORD FOR $IPFIRE_FTP_URL_PAK: !HIDDEN!"
+       fi
+       echo ""
+       echo -e "ONE OR MORE EMAIL ADDRESS(ES) TO WHICH THE REPORTS WILL BE SENT"
+       echo -e "(seperated by comma)"
+       read IPFIRE_MAIL_REPORT
+       echo -n "EMAIL FROM: "
+       read IPFIRE_MAIL_FROM
+       echo -n "EMAIL SERVER: "
+       read IPFIRE_MAIL_SERVER
+       echo -n "LOGIN TO MAIL SERVER: "
+       read IPFIRE_MAIL_USER
+       echo -n "MAIL PASSWORD: "
+       read -s IPFIRE_MAIL_PASS
+       echo -n "Saving..."
+       for i in `seq 20`; do
+               sleep 0.1; echo -n "."
+       done
+       echo ".Finished!"
+       cat <<END > .config
+### ISO server
+IPFIRE_FTP_URL_EXT=$IPFIRE_FTP_URL_EXT
+IPFIRE_FTP_PATH_EXT=$IPFIRE_FTP_PATH_EXT
+IPFIRE_FTP_USER_EXT=$IPFIRE_FTP_USER_EXT
+IPFIRE_FTP_PASS_EXT=$IPFIRE_FTP_PASS_EXT
+### cache server
+IPFIRE_FTP_URL_INT=$IPFIRE_FTP_URL_INT
+IPFIRE_FTP_PATH_INT=$IPFIRE_FTP_PATH_INT
+IPFIRE_FTP_USER_INT=$IPFIRE_FTP_USER_INT
+IPFIRE_FTP_PASS_INT=$IPFIRE_FTP_PASS_INT
+### paks server
+IPFIRE_FTP_URL_PAK=$IPFIRE_FTP_URL_PAK
+IPFIRE_FTP_PATH_PAK=$IPFIRE_FTP_PATH_PAK
+IPFIRE_FTP_USER_PAK=$IPFIRE_FTP_USER_PAK
+IPFIRE_FTP_PASS_PAK=$IPFIRE_FTP_PASS_PAK
+### mail reports
+IPFIRE_MAIL_REPORT=$IPFIRE_MAIL_REPORT
+IPFIRE_MAIL_FROM=$IPFIRE_MAIL_FROM
+IPFIRE_MAIL_SERVER=$IPFIRE_MAIL_SERVER
+IPFIRE_MAIL_USER=$IPFIRE_MAIL_USER
+IPFIRE_MAIL_PASS=$IPFIRE_MAIL_PASS
+END
+       ;;
+sync)
+       echo -e "Syncing cache to ftp:"
+#      rm -f doc/packages-to-remove-from-ftp
+       ncftpls -u $IPFIRE_FTP_USER_INT -p $IPFIRE_FTP_PASS_INT ftp://$IPFIRE_FTP_URL_INT$IPFIRE_FTP_PATH_INT/ > ftplist
+       for i in `ls -w1 cache/`; do
+               grep $i ftplist
+               if [ "$?" -ne "0" ]; then
+                       ncftpput -u $IPFIRE_FTP_USER_INT -p $IPFIRE_FTP_PASS_INT $IPFIRE_FTP_URL_INT $IPFIRE_FTP_PATH_INT/ cache/$i
+                       if [ "$?" -eq "0" ]; then
+                               echo -e "$i was successfully uploaded to the ftp server."
+                       else
+                               echo -e "There was an error while uploading $i to the ftp server."
+                       fi
+               fi
+       done
+#      for i in `cat ftplist`; do
+#              ls -w1 cache/ | grep $i
+#              if [ "$?" -eq "1" ]; then
+#                      echo $i | grep -v toolchain >> doc/packages-to-remove-from-ftp
+#              fi
+#      done
+       rm -f ftplist
+       ;;
+upload)
+       case "$2" in
+         iso)
+               echo -e "Uploading the iso to $IPFIRE_FTP_URL_EXT."
+               ncftpls -u $IPFIRE_FTP_USER_EXT -p $IPFIRE_FTP_PASS_EXT ftp://$IPFIRE_FTP_URL_EXT$IPFIRE_FTP_PATH_EXT/ | grep $SVN_REVISION
+               if [ "$?" -eq "1" ]; then
+                               cp $BASEDIR/ipfire-install-$VERSION.i386.iso $BASEDIR/ipfire-install-$VERSION.i386-r`svn info | grep Revision | cut -c 11-`.iso
+                               md5sum ipfire-install-$VERSION.i386-r$SVN_REVISION.iso > ipfire-install-$VERSION.i386-r$SVN_REVISION.iso.md5
+                               ncftpput -V -u $IPFIRE_FTP_USER_EXT -p $IPFIRE_FTP_PASS_EXT $IPFIRE_FTP_URL_EXT $IPFIRE_FTP_PATH_EXT/ ipfire-install-$VERSION.i386-r$SVN_REVISION.iso
+                               ncftpput -V -u $IPFIRE_FTP_USER_EXT -p $IPFIRE_FTP_PASS_EXT $IPFIRE_FTP_URL_EXT $IPFIRE_FTP_PATH_EXT/ ipfire-install-$VERSION.i386-r$SVN_REVISION.iso.md5
+                               ncftpput -V -u $IPFIRE_FTP_USER_EXT -p $IPFIRE_FTP_PASS_EXT $IPFIRE_FTP_URL_EXT $IPFIRE_FTP_PATH_EXT/ ipfire-source-*-r$SVN_REVISION.tar.gz
+                               if [ "$?" -eq "0" ]; then
+                                       echo -e "The ISO of Revision $SVN_REVISION was successfully uploaded to the ftp server."
+                               else
+                                       echo -e "There was an error while uploading the iso to the ftp server."
+                                       exit 1
+                               fi
+               else
+                       echo -e "File with name ipfire-install-$VERSION.i386-r$SVN_REVISION.iso already exists on the ftp server!"
+               fi
+               rm -f ipfire-install-$VERSION.i386-r$SVN_REVISION.iso{,.md5}
+               ;;
+         paks)
+               ncftpput -z -u $IPFIRE_FTP_USER_PAK -p $IPFIRE_FTP_PASS_PAK $IPFIRE_FTP_URL_PAK $IPFIRE_FTP_PATH_PAK/ packages/*
+               if [ "$?" -eq "0" ]; then
+                       echo -e "The packages were successfully uploaded to the ftp server."
                else
-                       exiterror "$PACKAGE.md5 did not match, check downloaded package"
+                       echo -e "There was an error while uploading the packages to the ftp server."
+                       exit 1
                fi
+         ;;
+       esac
+       ;;
+build-only)
+       rm -f $BASEDIR/log/$2*
+       BUILDMACHINE=`uname -m`
+       prepareenv
+       ipcopmake $2
+       ;;
+build-silent)
+       screen -dmS ipfire $0 build
+       echo "Build started... This will take a while!"
+       echo "You can see the status with 'screen -x ipfire'."
+       ;;
+mail)
+       chmod 755 tools/sendEmail
+       ATTACHMENT=/tmp/ipfire-build-logs-R$SVN_REVISION.tar.gz
+       if [ "$2" = "ERROR" ]; then
+               SUBJECT="ERROR: IPFIRE-BUILD R$SVN_REVISION on `hostname`"
+               echo "ERROR: $0 build!"
+               cat <<END > /tmp/ipfire_mail_body
+When I was building IPFire on `hostname`, I have found an ERROR!
+Here you can see the logs and detect the reason for this error.
+
+Best Regards
+Your IPFire-Build-Script
+END
+       fi
+       if [ "$2" = "SUCCESS" ]; then
+               SUBJECT="SUCCESS: IPFIRE-BUILD R$SVN_REVISION on `hostname`"
+               cat <<END > /tmp/ipfire_mail_body
+Building IPFire on `hostname` in Revision $SVN_REVISION was successfull!
+You can find the ISO on your ftp server.
+
+Statistics:
+-----------
+Started:       $IPFIRE_START_TIME
+Finished:      `date`
+
+Best Regards
+Your IPFire-Build-Script
+END
+       fi
+       if [ "$2" = "SVNUPDATE" ]; then
+               SUBJECT="SVNUPDATE: IPFIRE-BUILD R$SVN_REVISION on `hostname`"
+               echo "ERROR: $0 svn up!"
+               cat <<END > /tmp/ipfire_mail_body
+When I was downloading the latest svn source,
+I have found an ERROR!
+Here you can see the logs and detect the reason for this error.
+
+Best Regards
+Your IPFire-Build-Script
+END
+       fi
+
+       if [ "$2" = "SVNDIST" ]; then
+               SUBJECT="SVNDIST: IPFIRE-BUILD R$SVN_REVISION on `hostname`"
+               echo "ERROR: $0 svn dist!"
+               cat <<END > /tmp/ipfire_mail_body
+When I was exporting the latest svn source,
+I have found an ERROR!
+Here you can see the logs and detect the reason for this error.
+
+Best Regards
+Your IPFire-Build-Script
+END
+       fi
+
+       if [ "$2" = "PREFETCH" ]; then
+               SUBJECT="PREFETCH: IPFIRE-BUILD R$SVN_REVISION on `hostname`"
+               echo "ERROR: $0 prefetch!"
+               cat <<END > /tmp/ipfire_mail_body
+When I was downloading the source packages,
+I have found an ERROR!
+Here you can see the logs and detect the reason for this error.
+
+Best Regards
+Your IPFire-Build-Script
+END
+       fi
+
+       if [ "$2" = "ISO" ]; then
+               SUBJECT="ISO: IPFIRE-BUILD R$SVN_REVISION on `hostname`"
+               echo "ERROR: $0 upload iso!"
+               cat <<END > /tmp/ipfire_mail_body
+When I was uploading the iso image,
+I have found an ERROR!
+Here you can see the logs and detect the reason for this error.
+
+Best Regards
+Your IPFire-Build-Script
+END
+       fi
+
+       if [ "$2" = "PAKS" ]; then
+               SUBJECT="PAKS: IPFIRE-BUILD R$SVN_REVISION on `hostname`"
+               echo "ERROR: $0 upload paks!"
+               cat <<END > /tmp/ipfire_mail_body
+When I was uploading the packages,
+I have found an ERROR!
+Here you can see the logs and detect the reason for this error.
+
+Best Regards
+Your IPFire-Build-Script
+END
+       fi
+
+       tar cfz $ATTACHMENT log/_build*
+       cat <<END >> /tmp/ipfire_mail_body
+
+Here is a summary... The full logs are in the attachment.
+---------------------------------------------------------
+
+`tail log/_*`
+END
+       cat /tmp/ipfire_mail_body | tools/sendEmail -q \
+               -f $IPFIRE_MAIL_FROM \
+               -t $IPFIRE_MAIL_REPORT \
+               -u $SUBJECT \
+               -s $IPFIRE_MAIL_SERVER:25 \
+               -xu $IPFIRE_MAIL_USER \
+               -xp $IPFIRE_MAIL_PASS \
+               -l log/_build.mail.log \
+               -a $ATTACHMENT # -v
+       rm -f /tmp/ipfire_mail_body $ATTACHMENT
+       ;;
+unattended)
+       if [ ! -f .config ]; then
+               echo "No configuration found. Try ./make.sh make-config."
+       fi
+       ### This is our procedure that will compile the IPFire by herself...
+       echo "### UPDATE LOGS"
+       update_logs
+       echo "### SAVING TIME"
+       export IPFIRE_START_TIME=`date`
+
+       echo "### GETTING TOOLCHAIN"
+       $0 gettoolchain
+
+       echo "### RUNNING SVN-UPDATE"
+       $0 svn update
+       if [ $? -ne 0 ]; then
+               $0 mail SVNUPDATE
+               exit 1
+       fi
+       
+       echo "### EXPORT SOURCES"
+       $0 svn dist
+       if [ $? -ne 0 ]; then
+               $0 mail SVNDIST
+               exit 1
+       fi
+
+       echo "### RUNNING PREFETCH"
+       $0 prefetch | grep -q "md5 difference"
+       if [ $? -eq 0 ]; then
+               $0 mail PREFETCH
+               exit 1
+       fi
+
+       echo "### RUNNING BUILD"
+       $0 build
+       if [ $? -ne 0 ]; then
+               $0 mail ERROR
+               exit 1
        fi
+
+       echo "### MAKING SOURCES-ISO"
+       $0 sources-iso
+
+       echo "### UPLOADING ISO"
+       $0 upload iso
+       if [ $? -ne 0 ]; then
+               $0 mail ISO
+               exit 1
+       fi
+       
+       echo "### UPLOADING PAKS"
+       $0 upload paks
+       if [ $? -ne 0 ]; then
+               $0 mail PAKS
+               exit 1
+       fi
+
+       echo "### SUCCESS!"
+       $0 mail SUCCESS
+       exit 0
        ;;
-update)
-       echo "Load the latest source-files:"
-       svn update
+batch)
+       if [ `screen -ls | grep batch` ]; then
+               echo "Build is already running, sorry!"
+               exit 1
+       else
+               echo -n "IPFire-Batch-Build is starting..."
+               screen -dmS ipfire $0 unattended
+               if [ "$?" -eq "0" ]; then
+                       echo ".Done!"
+               else
+                       echo ".ERROR!"
+                       exit 1
+               fi
+               #if [ "$2" -eq "-v" ]; then
+               #       screen -x ipfire
+               #else
+               #       echo "You may attach you with '-v'."
+               #fi
+               exit 0
+       fi
        ;;
 *)
-       echo "Usage: $0 {build|changelog|check|checkclean|clean|dist|gettoolchain|newpak|prefetch|rootfiles|shell|toolchain|update}"
-       cat doc/make.sh-usage
-       exit 1
+       clear
+       svn info
+       select name in "Exit" "IPFIRE: Prefetch" "IPFIRE: Build (silent)" "IPFIRE: Watch Build" "IPFIRE: Batch" "IPFIRE: Clean" "SVN: Commit" "SVN: Update" "SVN: Status" "SVN: Diff" "LOG: Tail" "Help"
+       do
+       case $name in
+       "IPFIRE: Prefetch")
+               $0 prefetch
+               ;;
+       "IPFIRE: Build (silent)")
+               $0 build-silent
+               ;;
+       "IPFIRE: Watch Build")
+               echo "Exit with Ctrl+A, Ctrl+D."
+               echo -n "Preparing..."
+               for i in `seq 10`; do
+                       sleep 0.1; echo -n "."
+               done
+               echo ".Ready!"
+               sleep 0.3
+               screen -x ipfire
+               ;;
+       "IPFIRE: Batch")
+               $0 batch
+               ;;
+       "IPFIRE: Clean")
+               $0 clean
+               ;;
+       "SVN: Commit")
+               echo "Are your sure to Update all Files to the Server (write: yes)?"; read input
+               if [ "$input" == "yes" ]; then
+                       $0 svn commit
+               fi
+               ;;
+       "SVN: Update")
+               $0 svn update
+               ;;
+       "SVN: Status")
+               svn status # | grep -v ^?
+               ;;
+       "SVN: Diff")
+               $0 svn diff
+               ;;
+       "Help")
+               echo "Usage: $0 {build|changelog|check|checkclean|clean|gettoolchain|newpak|prefetch|shell|sync|toolchain}"
+               cat doc/make.sh-usage
+               ;;
+       "LOG: Tail")
+               tail -f log/_*
+               ;;
+       "Exit")
+               break
+               ;;
+       esac
+       done
        ;;
 esac