+upload)
+ case "$2" in
+ iso)
+ echo -e "Uploading the iso to $IPFIRE_FTP_URL_EXT."
+ 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 "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
+ ;;
+ 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 $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
+ ;;
+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