updated to also fix batch files for xsede.
authorChris Koeritz <fred@gruntose.com>
Fri, 13 Apr 2012 19:40:02 +0000 (15:40 -0400)
committerChris Koeritz <fred@gruntose.com>
Fri, 13 Apr 2012 19:40:02 +0000 (15:40 -0400)
examples/custom_overrides/fred/build_cak0l.sh

index b1a484d3d277bf588c458ffd39a6808b3d5e29f3..538089923027a8cee17391d4f3bfea11e14f2ed3 100644 (file)
@@ -5,12 +5,27 @@ function build_cak0l()
   pushd ~/xsede/code/cak0l/trunk
   ant -Dbuild.targetArch=64 build
   # fix memory limits.
-  sed -e "s/-Xmx512M/-Xmx2G/" < "runContainer.sh" >"$TMP/${USER}_edited.tmp"
-  mv "$TMP/${USER}_edited.tmp" "runContainer.sh" 
-  sed -e "s/-Xmx512M/-Xmx1G/" < "grid" >"$TMP/${USER}_edited.tmp"
-  mv "$TMP/${USER}_edited.tmp" "grid" 
-  chmod 755 "grid" "runContainer.sh" 
-  popd
+#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" 
+    sed -e "s/-Xmx512M/-Xmx1G/" < "grid" >"$TMP/${USER}_edited.tmp"
+  fi
+  if [ -f grid ]; then
+    mv "$TMP/${USER}_edited.tmp" "grid" 
+    chmod 755 "grid" "runContainer.sh" 
+    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" 
+    sed -e "s/-Xmx512M/-Xmx1G/" < "grid" >"$TMP/${USER}_edited.tmp"
+  fi
+  if [ -f grid ]; then
+    mv "$TMP/${USER}_edited.tmp" "grid" 
+    chmod 755 "grid" "runContainer.bat" 
+    popd
+  fi
 }
 
 function rebuild_cak0l()