cleaned this up and got it working again.
[feisty_meow.git] / scripts / archival / pickle_genesis2.sh
1 #!/bin/bash
2
3 #untested recently!!!
4
5 # load in our helper functions, like date_stringer.
6 source "$FEISTY_MEOW_SCRIPTS/core/functions.sh"
7
8 # get into the genesis directory to package up.
9 pushd $GENII_INSTALL_DIR &>/dev/null
10
11 # clean out any class files or other generated junk.
12 echo Cleaning the code before pickling...
13 ant clean &>/dev/null
14
15 # do one update to get to the latest point.
16 echo Updating to latest code before pickling...
17 svn update . &>/dev/null
18
19 # get the svn revision number from the code now we're sure what prompt we can look for,
20 # modulo any check-ins since the above update was running.
21 svn_revision=$(svn update . | grep "At revision [0-9]*" | sed -e 's/[^0-9]*\([0-9]*\)[^0-9]*/\1/' )
22
23 filename="$HOME/GenesisII_source_rev${svn_revision}_on_$(date_stringer).tar.gz"
24
25 echo "Now pickling code into build archive: $(basename $filename)"
26
27 # hop up one level to be above the trunk folder.
28 cd ..
29
30 # now do the actual packing of the code, without some things we do not wish to share.
31 just_dir=$(basename $GENII_INSTALL_DIR)
32 #echo just dir is $just_dir
33 tar -czf $filename "$just_dir" --exclude="trunk/deployments/Genii*" --exclude="installer_base" --exclude=".svn" --exclude="products/*" --exclude="Media/*"
34
35 popd &>/dev/null
36