]> git.ipfire.org Git - ipfire-2.x.git/blobdiff - make.sh
Direkt ein Fix fuer eben genannte Sachen...
[ipfire-2.x.git] / make.sh
diff --git a/make.sh b/make.sh
index d774d4d845817a54868aee345242880b8f86f27f..b46686942294b89c927137db03adb698e0d11ca6 100644 (file)
--- a/make.sh
+++ b/make.sh
@@ -344,7 +344,7 @@ ipcopmake() {
 
 ipfiredist() {
        if [ -f $BASEDIR/build/usr/src/lfs/$1 ]; then
-#         if [ ! `ls -w1 $BASEDIR/packages/*.tar.gz | grep $1` ]; then
+#         if [ ! `ls -w1 $BASEDIR/packages/*.ipfire | grep $1` ]; then
                echo "`date -u '+%b %e %T'`: Packaging $1" | tee -a $LOGFILE
                chroot $LFS /tools/bin/env -i   HOME=/root \
                                                TERM=$TERM PS1='\u:\w\$ ' \
@@ -587,6 +587,11 @@ buildipcop() {
   ipcopmake python
   ipcopmake libnet
   ipcopmake libpng
+  ipcopmake libtiff
+  ipcopmake libjpeg
+  ipcopmake lcms
+  ipcopmake libmng
+  ipcopmake freetype
   ipcopmake gd
   ipcopmake popt
   ipcopmake slang
@@ -681,11 +686,6 @@ buildipcop() {
   ipcopmake startscripts
 ## Zuerst die Libs und dann die Programme. Ordnung muss sein!
   ipcopmake java
-  ipcopmake libtiff
-  ipcopmake libjpeg
-  ipcopmake lcms
-  ipcopmake libmng
-  ipcopmake freetype
   ipcopmake bootsplash
   ipcopmake libxml2
   ipcopmake spandsp
@@ -732,9 +732,17 @@ buildipcop() {
   ipcopmake bristuff
   ipcopmake asterisk
   ipcopmake mpg123
-  echo -ne "`date -u '+%b %e %T'`: Building ### MP3-Server ### \n" | tee -a $LOGFILE
+  echo -ne "`date -u '+%b %e %T'`: Building ### Multimedia-Server ### \n" | tee -a $LOGFILE
+  ipcopmake libmad
+  ipcopmake libogg
+  ipcopmake libvorbis
   ipcopmake lame
+  ipcopmake xvid
+  ipcopmake mpeg2dec
+  ipcopmake ffmpeg
+  ipcopmake sox
   ipcopmake gnump3d
+  ipcopmake videolan
   echo -ne "`date -u '+%b %e %T'`: Building ### P2P-Clients ### \n" | tee -a $LOGFILE
   ipcopmake applejuice
   ipcopmake ocaml
@@ -754,6 +762,10 @@ buildipcop() {
   ipcopmake cftp
   ipcopmake etherwake
   ipcopmake ethereal
+  ipcopmake tftp-hpa
+  ipcopmake subversion
+  ipcopmake iptraf
+  ipcopmake nagios
 #  ipcopmake stunnel # Ausgeschaltet, weil wir es doch nicht nutzen
 }
 
@@ -827,7 +839,7 @@ 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$\|pakfire$\|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
@@ -854,6 +866,8 @@ buildpackages() {
                cat $i | sed "s%^\./%#%" | sort >> $BASEDIR/log/FILES
        fi
   done
+  cd $BASEDIR/packages; ls -w1 *.ipfire | awk -F ".ipfire" '{ print $1 }' > $BASEDIR/packages/packages_list.txt
+  echo "###EOF###" >> $BASEDIR/packages/packages_list.txt
 
   cd $PWD
 
@@ -867,30 +881,42 @@ ipfirepackages() {
   fi
   ipfiredist amavisd
   ipfiredist applejuice
-  ipfiredist asterisk
+  ipfiredist asterisk
   ipfiredist clamav
   ipfiredist cups
   ipfiredist cyrusimap
   ipfiredist fetchmail
+  ipfiredist ffmpeg
   ipfiredist gnump3d
+  ipfiredist iptraf
   ipfiredist java
   ipfiredist lame
+  ipfiredist libmad
+  ipfiredist libogg
   ipfiredist libtiff
+  ipfiredist libvorbis
   ipfiredist libxml2
   ipfiredist mailx
   ipfiredist mldonkey
+  ipfiredist mpeg2dec
+  ipfiredist nagios
   ipfiredist nfs
   ipfiredist nmap
   ipfiredist ntop
+  ipfiredist portmap
   ipfiredist postfix
   ipfiredist procmail
   ipfiredist samba
+  ipfiredist sox
   ipfiredist spamassassin
+  ipfiredist subversion
+  ipfiredist videolan
   ipfiredist web-cyradm
   ipfiredist xampp
-  ipfiredist xinetd
+#  ipfiredist xinetd
+  ipfiredist xvid
   test -d $BASEDIR/packages || mkdir $BASEDIR/packages
-  mv -f $LFS/install/packages/*.{tar.gz,md5} $BASEDIR/packages >> $LOGFILE 2>&1
+  mv -f $LFS/install/packages/*.{ipfire,md5} $BASEDIR/packages >> $LOGFILE 2>&1
   rm -rf  $BASEDIR/build/install/packages/*
 }
 
@@ -903,7 +929,7 @@ update_logs() {
 case "$1" in 
 build)
        BUILDMACHINE=`uname -m`
-       PACKAGE=`ls -v -r $BASEDIR/cache/$SNAME-$VERSION-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
@@ -1101,32 +1127,49 @@ toolchain)
        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-$VERSION-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 $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
+       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
-                       exiterror "$PACKAGE.md5 did not match, check downloaded package"
+                       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)
@@ -1147,17 +1190,26 @@ svn)
                        echo ".Fail!"
                        exit 1
                fi
+               chmod 755 $0
+               tail log/_build.svn.update.log
                exit 0
          ;;
          commit|ci)
                clear
+               if [ -e /sbin/yast ]; then
+                       $0 changelog
+               fi
                echo "Upload the changed files..."
                sleep 1
-               svn commit
+               IPFIRE_SVN_MESSAGE=/tmp/ipfire-svn-co-message.txt
+               rm -f $IPFIRE_SVN_MESSAGE
+               mcedit $IPFIRE_SVN_MESSAGE
+               svn commit -F $IPFIRE_SVN_MESSAGE
+               rm -f $IPFIRE_SVN_MESSAGE
                $0 svn up
          ;;
          dist)
-               $0 svn up
+               #$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
@@ -1167,7 +1219,7 @@ svn)
                        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
+               tar cfz ipfire-source-r$SVN_REVISION.tar.gz ipfire-source
                if [ "$?" -eq "0" ]; then
                        echo ".Done!"
                else
@@ -1198,7 +1250,6 @@ svn)
        ;;
 make-config)
        echo -e "This is for creating your configuration..."
-       echo -e "ATTENTION: Even your password will be shown when typed!"
        echo -e "We will need some input:"
        echo -e ""
        echo -n "FTP-DOMAIN FOR THE ISO: "
@@ -1208,7 +1259,7 @@ make-config)
        echo -n "USERNAME FOR $IPFIRE_FTP_URL_EXT: "
        read IPFIRE_FTP_USER_EXT
        echo -n "PASSWORD FOR $IPFIRE_FTP_URL_EXT: "
-       read IPFIRE_FTP_PASS_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: "
@@ -1219,13 +1270,13 @@ make-config)
                echo -n "USERNAME FOR $IPFIRE_FTP_URL_INT: "
                read IPFIRE_FTP_USER_INT
                echo -n "PASSWORD FOR $IPFIRE_FTP_URL_INT: "
-               read IPFIRE_FTP_PASS_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: $IPFIRE_FTP_PASS_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.)"
@@ -1237,13 +1288,13 @@ make-config)
                echo -n "USERNAME FOR $IPFIRE_FTP_URL_PAK: "
                read IPFIRE_FTP_USER_PAK
                echo -n "PASSWORD FOR $IPFIRE_FTP_URL_PAK: "
-               read IPFIRE_FTP_PASS_PAK
+               read -s IPFIRE_FTP_PASS_PAK
        else
                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: $IPFIRE_FTP_PASS_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"
@@ -1256,7 +1307,7 @@ make-config)
        echo -n "LOGIN TO MAIL SERVER: "
        read IPFIRE_MAIL_USER
        echo -n "MAIL PASSWORD: "
-       read IPFIRE_MAIL_PASS
+       read -s IPFIRE_MAIL_PASS
        echo -n "Saving..."
        for i in `seq 20`; do
                sleep 0.1; echo -n "."
@@ -1288,7 +1339,7 @@ END
        ;;
 sync)
        echo -e "Syncing cache to ftp:"
-       rm -f doc/packages-to-remove-from-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
@@ -1301,40 +1352,54 @@ sync)
                        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
+#      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 -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 -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
-                               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."
-                               fi
+               cat <<EOF > .ftp-commands
+mkdir $IPFIRE_FTP_PATH_EXT
+ls -lah
+quit
+EOF
+               ncftp -u $IPFIRE_FTP_USER_EXT -p $IPFIRE_FTP_PASS_EXT $IPFIRE_FTP_URL_EXT < .ftp-commands
+               rm -f .ftp-commands
+               md5sum ipfire-install-$VERSION.i386.iso > ipfire-install-$VERSION.i386.iso.md5
+               ncftpput -u $IPFIRE_FTP_USER_EXT -p $IPFIRE_FTP_PASS_EXT $IPFIRE_FTP_URL_EXT $IPFIRE_FTP_PATH_EXT/ ipfire-install-$VERSION.i386.iso
+               ncftpput -u $IPFIRE_FTP_USER_EXT -p $IPFIRE_FTP_PASS_EXT $IPFIRE_FTP_URL_EXT $IPFIRE_FTP_PATH_EXT/ ipfire-install-$VERSION.i386.iso.md5
+               ncftpput -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
+               ncftpput -u $IPFIRE_FTP_USER_EXT -p $IPFIRE_FTP_PASS_EXT $IPFIRE_FTP_URL_EXT $IPFIRE_FTP_PATH_EXT/ svn_status
+               if [ "$?" -eq "0" ]; then
+                       echo -e "The iso of Revision $SVN_REVISION was successfully uploaded to $IPFIRE_FTP_URL_EXT$IPFIRE_FTP_PATH_EXT/."
                else
-                       echo -e "File with name ipfire-install-$VERSION.i386-r$SVN_REVISION.iso already exists on the ftp server!"
+                       echo -e "There was an error while uploading the iso to the ftp server."
+                       exit 1
+               fi
+               if [ "$3" = "--with-sources-cd" ]; then
+                       ncftpput -u $IPFIRE_FTP_USER_EXT -p $IPFIRE_FTP_PASS_EXT $IPFIRE_FTP_URL_EXT $IPFIRE_FTP_PATH_EXT/ ipfire-sources-cd-$VERSION.$MACHINE.iso
                fi
-               rm -f ipfire-install-$VERSION.i386-r$SVN_REVISION.iso{,.md5}
                ;;
          paks)
+               cat <<EOF > .ftp-commands
+mkdir $IPFIRE_FTP_PATH_PAK
+ls -lah
+quit
+EOF
+               ncftp -u $IPFIRE_FTP_USER_PAK -p $IPFIRE_FTP_PASS_PAK $IPFIRE_FTP_URL_PAK < .ftp-commands
+               rm -f .ftp-commands
                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."
+                       echo -e "The packages were successfully uploaded to $IPFIRE_FTP_URL_PAK$IPFIRE_FTP_PATH_PAK/."
                else
                        echo -e "There was an error while uploading the packages to the ftp server."
+                       exit 1
                fi
          ;;
        esac
@@ -1391,6 +1456,20 @@ 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!"
@@ -1450,25 +1529,40 @@ END
        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 "### RUNNING SVN-UPDATE"
-       $0 svn update > /dev/null
-       if [ $? -ne 0 ]; then
-               $0 mail SVNUPDATE
-               exit 1
-       fi
-       chmod 755 $0
+       if [ "$IPFIRE_REBUILD" -eq "0" ]; then
+               echo "### SAVING TIME"
+               export IPFIRE_START_TIME=`date`
 
-       echo "### RUNNING PREFETCH"
-       $0 prefetch | grep -q "md5 difference"
-       if [ $? -eq 0 ]; then
-               $0 mail PREFETCH
-               exit 1
+               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
        fi
 
        echo "### RUNNING BUILD"
@@ -1478,6 +1572,10 @@ unattended)
                exit 1
        fi
 
+       echo "### MAKING SOURCES-ISO"
+       echo "DISABLED by Delaco!"
+       #$0 sources-iso
+
        echo "### UPLOADING ISO"
        $0 upload iso
        if [ $? -ne 0 ]; then
@@ -1494,15 +1592,34 @@ unattended)
 
        echo "### SUCCESS!"
        $0 mail SUCCESS
+       exit 0
        ;;
 batch)
-       screen -dmS batch $0 unattended
-       exit 0
+       if [ `screen -ls | grep -q ipfire` ]; then
+               echo "Build is already running, sorry!"
+               exit 1
+       else
+               if [ "$2" = "--rebuild" ]; then
+                       export IPFIRE_REBUILD=1
+                       echo "REBUILD!"
+               else
+                       export IPFIRE_REBUILD=0
+               fi
+               echo -n "IPFire-Batch-Build is starting..."
+               screen -dmS ipfire $0 unattended
+               if [ "$?" -eq "0" ]; then
+                       echo ".Done!"
+               else
+                       echo ".ERROR!"
+                       exit 1
+               fi
+               exit 0
+       fi
        ;;
 *)
        clear
        svn info
-       select name in "Exit" "IPFIRE: Prefetch" "IPFIRE: Build (silent)" "IPFIRE: Watch Build" "IPFIRE: Clean" "SVN: Commit" "SVN: Update" "SVN: Status" "SVN: Diff" "Help"
+       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")
@@ -1521,11 +1638,18 @@ batch)
                sleep 0.3
                screen -x ipfire
                ;;
+       "IPFIRE: Batch")
+               $0 batch
+               ;;
        "IPFIRE: Clean")
                $0 clean
                ;;
        "SVN: Commit")
-               $0 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
+               $0 sync
                ;;
        "SVN: Update")
                $0 svn update
@@ -1540,6 +1664,9 @@ batch)
                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
                ;;