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