better version actually tests the pieces for success.
[feisty_meow.git] / customizing / fred / build_cak0l.sh
1 #!/bin/bash
2
3 source "$FEISTY_MEOW_SCRIPTS/core/functions.sh"  # for check_result.
4
5 function build_xsede()
6 {
7   pushd ~/xsede/code/cak0l/trunk
8   check_result "entering trunk directory"
9   echo "Build starting at: $(date)"
10   \rm -rf unit-test-reports
11   ant -Dbuild.targetArch=64 build
12   check_result "building the trunk"
13   # fix memory limits.
14 #hmmm: clean these up.
15   if [ -f runContainer.sh ]; then
16     sed -i -e "s/-Xmx512M/-Xmx2G/" "runContainer.sh" 
17     chmod 755 "runContainer.sh" 
18   fi
19   if [ -f grid ]; then
20 #    sed -i -e "s/-Xmx512M/-Xmx1G/" "grid"
21     chmod 755 "grid"
22   fi
23   if [ -f runContainer.bat ]; then
24     sed -i -e "s/-Xmx512M/-Xmx2G/" "runContainer.bat"
25     chmod 755 "runContainer.bat" 
26   fi
27   if [ -f grid.bat ]; then
28 #    sed -i -e "s/-Xmx512M/-Xmx1G/" "grid.bat"
29     chmod 755 "grid.bat"
30   fi
31   echo "Build done at: $(date)"
32   popd
33 }
34
35 function rebuild_xsede()
36 {
37   pushd ~/xsede/code/cak0l/trunk
38   ant clean
39   check_result "cleaning the trunk"
40   popd
41   build_xsede
42 }
43