+sync)
+ echo -e "Syncing Cache to FTP:"
+ if [ -f .pass ]; then
+ PASS="`cat .pass`"
+ else
+ echo -ne "Password for mirror.ipfire.org: "; read PASS
+ fi
+ rm -f doc/packages-to-remove-from-ftp
+ ncftpls -u web3 -p $PASS ftp://mirror.ipfire.org/html/source-packages/source/ > ftplist
+ for i in `ls -w1 cache/`; do
+ grep $i ftplist
+ if [ "$?" -ne "0" ]; then
+ ncftpput -u web3 -p $PASS mirror.ipfire.org /html/source-packages/source 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
+ ;;
+pub-iso)
+ echo -e "Upload the ISO to the beta-mirror!"
+ if [ -f .pass ]; then
+ PASS="`cat .pass`"
+ else
+ echo -ne "Password for mirror.ipfire.org: "; read PASS
+ fi
+ ncftpls -u web3 -p $PASS ftp://mirror.ipfire.org/html/source-packages/beta/ | grep `svn info | grep Revision | cut -c 11-`
+ if [ "$?" -eq "1" ]; then
+ cp $BASEDIR/ipfire-install-1.4.i386.iso $BASEDIR/ipfire-install-1.4.i386-r`svn info | grep Revision | cut -c 11-`.iso
+ md5sum ipfire-install-1.4.i386-r`svn info | grep Revision | cut -c 11-`.iso > ipfire-install-1.4.i386-r`svn info | grep Revision | cut -c 11-`.iso.md5
+ ncftpput -u web3 -p $PASS mirror.ipfire.org /html/source-packages/beta/ ipfire-install-1.4.i386-r`svn info | grep Revision | cut -c 11-`.iso
+ ncftpput -u web3 -p $PASS mirror.ipfire.org /html/source-packages/beta/ ipfire-install-1.4.i386-r`svn info | grep Revision | cut -c 11-`.iso.md5
+ if [ "$?" -eq "0" ]; then
+ echo -e "The ISO of Revision `svn info | grep Revision | cut -c 11-` was successfully uploaded to the ftp server."
+ else
+ echo -e "There was an error while uploading the ISO to the ftp server."
+ fi
+ else
+ echo -e "File with name ipfire-install-1.4.i386-r`svn info | grep Revision | cut -c 11-`.iso already exists on the ftp server!"
+ fi
+ rm -f ipfire-install-1.4.i386-r`svn info | grep Revision | cut -c 11-`.iso{,.md5}
+ ;;
+pub-paks)
+ echo -e "Upload the packages to the beta-mirror!"
+ if [ -f .pass ]; then
+ PASS="`cat .pass`"
+ else
+ echo -ne "Password for mirror.ipfire.org: "; read PASS
+ fi
+ ncftpput -z -u web3 -p $PASS mirror.ipfire.org /html/source-packages/packages/ packages/*
+ if [ "$?" -eq "0" ]; then
+ echo -e "The packages were successfully uploaded to the ftp server."
+ else
+ echo -e "There was an error while uploading the packages to the ftp server."
+ fi
+ ;;
+build-only)
+ rm -f $BASEDIR/log/$2*
+ BUILDMACHINE=`uname -m`
+ prepareenv
+ ipcopmake $2
+ ;;