f30fdedc0c68886a425fd08c4aa4fc1044f99382
[feisty_meow.git] / scripts / buildor / build_xsedes.sh
1 #!/bin/bash
2
3 source "$FEISTY_MEOW_SCRIPTS/core/functions.sh"
4
5 function build_xsede()
6 {
7   if [ -z "$GENII_INSTALL_DIR" ]; then
8     echo GENII_INSTALL_DIR is not set.
9     return 1
10   fi
11   pushd $GENII_INSTALL_DIR
12   if [ $? -ne 0 ]; then return 1; fi
13   echo "Build starting at: $(date)"
14   \rm -rf unit-test-reports
15 #  # update the libs first.
16 #  ant update
17   if [ $? -ne 0 ]; then return 1; fi
18   # then build the trunk.
19   ant -Dbuild.targetArch=64 build
20   if [ $? -ne 0 ]; then return 1; fi
21   # fix memory limits.
22 #hmmm: clean these up.
23   if [ -f runContainer.sh ]; then
24     sed -i -e "s/-Xmx512M/-Xmx2G/" "runContainer.sh" 
25     chmod 755 "runContainer.sh" 
26   fi
27   if [ -f grid ]; then
28 #    sed -i -e "s/-Xmx512M/-Xmx1G/" "grid"
29     chmod 755 "grid"
30   fi
31   if [ -f runContainer.bat ]; then
32     sed -i -e "s/-Xmx512M/-Xmx2G/" "runContainer.bat"
33     chmod 755 "runContainer.bat" 
34   fi
35   if [ -f grid.bat ]; then
36 #    sed -i -e "s/-Xmx512M/-Xmx1G/" "grid.bat"
37     chmod 755 "grid.bat"
38   fi
39   echo "Build done at: $(date)"
40   popd
41 }
42
43 function rebuild_xsede()
44 {
45   if [ -z "$GENII_INSTALL_DIR" ]; then
46     echo GENII_INSTALL_DIR is not set.
47     return 1
48   fi
49   pushd $GENII_INSTALL_DIR
50   ant clean
51   if [ $? -ne 0 ]; then return 1; fi
52   popd
53   build_xsede
54 }
55