Added script to automate building and publishing i2pupdate.zip files

Change the variables DEVDIR and ZIPDIR at the top of the script as appropriate.
Use case (from any directory - useful when already neck-deep in the source):
buildupdate.sh i2p.i2p
Adding -f at the end will clean the build tree first.
Couldn't decide what folder this should go in, so just placing in root.
This commit is contained in:
str4d
2012-09-29 01:25:40 +00:00
parent b4a16b20c5
commit 2097151336

39
buildupdater.sh Executable file
View File

@ -0,0 +1,39 @@
#!/bin/bash
DEVDIR=$HOME/dev
ZIPDIR=$HOME/builds
if [ -d $DEVDIR/$1 ]
then
cd $DEVDIR/$1
if [ $# -ge 2 ] && [ $2 == "-f" ]
then
echo
echo "Cleaning up $1 build directories..."
echo
ant distclean
fi
echo
echo "Building update file for $1..."
echo
ant updater
echo
echo "Copying update file for $1 to eepsite..."
if [ ! -d $ZIPDIR/$1 ]
then
mkdir -p $ZIPDIR/$1
else
if [ -f $ZIPDIR/$1/i2pupdate.zip ]
then
rm $ZIPDIR/$1/i2pupdate.zip
fi
fi
mv $DEVDIR/$1/i2pupdate.zip $ZIPDIR/$1
echo
echo "Done!"
else
echo "$1 is not a valid branch!"
fi