From 86840a263eb1c7c4705a5cc23f7b8b58ecadeb52 Mon Sep 17 00:00:00 2001 From: Chris Koeritz Date: Fri, 13 Apr 2012 15:40:02 -0400 Subject: [PATCH] updated to also fix batch files for xsede. --- examples/custom_overrides/fred/build_cak0l.sh | 27 ++++++++++++++----- 1 file changed, 21 insertions(+), 6 deletions(-) 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() -- 2.34.1