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:
39
buildupdater.sh
Executable file
39
buildupdater.sh
Executable 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
|
Reference in New Issue
Block a user