updated to not set memory higher.
[feisty_meow.git] / examples / custom_overrides / fred / build_cak0l.sh
index 37b2538842b5cc790e8a4eab4e0eb9dd30218a12..796d3226de2f2066f32950ec82dee216ea0e61f2 100644 (file)
@@ -1,18 +1,40 @@
 #!/bin/bash
 
-function rebuild_cak0l()
+function build_cak0l()
 {
   pushd ~/xsede/code/cak0l/trunk
-  ant clean
   ant -Dbuild.targetArch=64 build
-  popd
+  # fix memory limits.
+#hmmm: clean these up.
+  if [ -f runContainer.sh ]; then
+    sed -e "s/-Xmx512M/-Xmx2G/" < "runContainer.sh" >"$TMP/${USER}_edited.tmp"
+    mv "$TMP/${USER}_edited.tmp" "runContainer.sh" 
+    chmod 755 "runContainer.sh" 
+  fi
+  if [ -f grid ]; then
+#    sed -e "s/-Xmx512M/-Xmx1G/" < "grid" >"$TMP/${USER}_edited.tmp"
+    mv "$TMP/${USER}_edited.tmp" "grid" 
+    chmod 755 "grid"
+    popd
+  fi
+  if [ -f runContainer.bat ]; then
+    sed -e "s/-Xmx512M/-Xmx2G/" < "runContainer.bat" >"$TMP/${USER}_edited.tmp"
+    mv "$TMP/${USER}_edited.tmp" "runContainer.bat" 
+    chmod 755 "runContainer.bat" 
+  fi
+  if [ -f grid.bat ]; then
+#    sed -e "s/-Xmx512M/-Xmx1G/" < "grid.bat" >"$TMP/${USER}_edited.tmp"
+    mv "$TMP/${USER}_edited.tmp" "grid.bat" 
+    chmod 755 "grid.bat"
+    popd
+  fi
 }
 
-function build_cak0l()
+function rebuild_cak0l()
 {
   pushd ~/xsede/code/cak0l/trunk
-  ant -Dbuild.targetArch=64 build
+  ant clean
   popd
+  build_cak0l
 }
 
-