X-Git-Url: https://feistymeow.org/gitweb/?a=blobdiff_plain;f=scripts%2Fbuildor%2Fbuild_xsedes.sh;h=806d8ad7e8ac338584d01ab18e23d0bf725cb88f;hb=acd81f8c0fd50132f3ac3ff4fb304f48e13114aa;hp=db28af00cab28b6746b41c4245c6c8c7cdad94ce;hpb=5197970e64f3aab64e89a5e2346e773f8b4fa5c4;p=feisty_meow.git diff --git a/scripts/buildor/build_xsedes.sh b/scripts/buildor/build_xsedes.sh index db28af00..806d8ad7 100644 --- a/scripts/buildor/build_xsedes.sh +++ b/scripts/buildor/build_xsedes.sh @@ -2,6 +2,9 @@ source "$FEISTY_MEOW_SCRIPTS/core/functions.sh" +#hmmm: if this works well, we can use it in lots of places. +alias BAIL_ON_FAIL='if [ $? -ne 0 ]; then echo "A problem occurred. $msg"; return 1; fi' + function build_xsede() { if [ -z "$GENII_INSTALL_DIR" ]; then @@ -11,33 +14,17 @@ function build_xsede() pushd $GENII_INSTALL_DIR if [ $? -ne 0 ]; then return 1; fi echo "Build starting at: $(date)" + + # clean up some things. \rm -rf unit-test-reports - # update the libs first. - ant update - if [ $? -ne 0 ]; then return 1; fi - # then build the trunk. + + # build the trunk. ant -Dbuild.targetArch=64 build if [ $? -ne 0 ]; then return 1; fi - # fix memory limits. -#hmmm: clean these up. - if [ -f runContainer.sh ]; then - sed -i -e "s/-Xmx512M/-Xmx2G/" "runContainer.sh" - chmod 755 "runContainer.sh" - fi - if [ -f grid ]; then -# sed -i -e "s/-Xmx512M/-Xmx1G/" "grid" - chmod 755 "grid" - fi - if [ -f runContainer.bat ]; then - sed -i -e "s/-Xmx512M/-Xmx2G/" "runContainer.bat" - chmod 755 "runContainer.bat" - fi - if [ -f grid.bat ]; then -# sed -i -e "s/-Xmx512M/-Xmx1G/" "grid.bat" - chmod 755 "grid.bat" - fi echo "Build done at: $(date)" popd + + success_sound } function rebuild_xsede() @@ -48,8 +35,46 @@ function rebuild_xsede() fi pushd $GENII_INSTALL_DIR ant clean + if [ $? -ne 0 ]; then return 1; fi popd build_xsede } +# a shortcut for doing a new build and creating a bootstrap container with it. +function rebu_bootstrap() +{ + rebuild_xsede + if [ $? -ne 0 ]; then echo "failed to rebuild xsede code"; return 1; fi + + bash $GENII_INSTALL_DIR/xsede_tools/library/bootstrap_quick_start.sh + if [ $? -ne 0 ]; then echo "failed to bootstrap a container"; return 1; fi + + success_sound +} + +# a shortcut for building without a clean, and creating a bootstrap container with the code. +function bu_bootstrap() +{ + build_xsede + if [ $? -ne 0 ]; then echo "failed to rebuild xsede code"; return 1; fi + + bash $GENII_INSTALL_DIR/xsede_tools/library/bootstrap_quick_start.sh + if [ $? -ne 0 ]; then echo "failed to bootstrap a container"; return 1; fi + + success_sound +} + +# a shortcut for doing a quick build and then creating an installer. +function fast_install_build() +{ + build_xsede + if [ $? -ne 0 ]; then echo "failed to build xsede code"; return 1; fi + + bash $GENII_INSTALL_DIR/xsede_tools/tools/installer/fast_installer_build.sh $* + if [ $? -ne 0 ]; then echo "failed to create the installer."; return 1; fi + + success_sound +} + +