From 2097151336effe8b61cd5e784cb3933e45ecab7a Mon Sep 17 00:00:00 2001 From: str4d Date: Sat, 29 Sep 2012 01:25:40 +0000 Subject: [PATCH] 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. --- buildupdater.sh | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100755 buildupdater.sh diff --git a/buildupdater.sh b/buildupdater.sh new file mode 100755 index 0000000..27d03fe --- /dev/null +++ b/buildupdater.sh @@ -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