From: Chris Koeritz Date: Fri, 13 Apr 2012 19:40:02 +0000 (-0400) Subject: updated to also fix batch files for xsede. X-Git-Tag: 2.140.90~1426 X-Git-Url: https://feistymeow.org/gitweb/?p=feisty_meow.git;a=commitdiff_plain;h=86840a263eb1c7c4705a5cc23f7b8b58ecadeb52 updated to also fix batch files for xsede. --- diff --git a/examples/custom_overrides/fred/build_cak0l.sh b/examples/custom_overrides/fred/build_cak0l.sh index b1a484d3..53808992 100644 --- a/examples/custom_overrides/fred/build_cak0l.sh +++ b/examples/custom_overrides/fred/build_cak0l.sh @@ -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()