From 07a57d01c8b8d93424bbe9f7d05ccdc1e8a23053 Mon Sep 17 00:00:00 2001 From: Chris Koeritz Date: Thu, 6 Aug 2015 13:02:38 -0400 Subject: [PATCH] added process zapping before building. --- scripts/buildor/gffs_builders.sh | 37 ++++++++++++++++++++++++-------- 1 file changed, 28 insertions(+), 9 deletions(-) diff --git a/scripts/buildor/gffs_builders.sh b/scripts/buildor/gffs_builders.sh index af7273e3..f5f15b26 100644 --- a/scripts/buildor/gffs_builders.sh +++ b/scripts/buildor/gffs_builders.sh @@ -5,12 +5,26 @@ source "$FEISTY_MEOW_SCRIPTS/core/functions.sh" #hmmm: if this works well, we can use it in lots of places. define_yeti_alias BAIL_ON_FAIL='if [ $? -ne 0 ]; then echo "A problem occurred. $msg"; return 1; fi' +function zapem() +{ + bash $XSEDE_TEST_ROOT/library/zap_genesis_javas.sh +} + +# a macro for testing the configuration. +export GFFS_CHECK_VARS=' + if [ -z "$GENII_INSTALL_DIR" -o -z "$XSEDE_TEST_ROOT" ]; then + echo "GENII_INSTALL_DIR is not set."; + return 1; + fi ' + function build_gffs() { - if [ -z "$GENII_INSTALL_DIR" ]; then - echo GENII_INSTALL_DIR is not set. - return 1 - fi + eval $GFFS_CHECK_VARS +# if [ -z "$GENII_INSTALL_DIR" -o -z "$XSEDE_TEST_ROOT" ]; then +# echo GENII_INSTALL_DIR is not set. +# return 1 +# fi + zapem pushd "$GENII_INSTALL_DIR" if [ $? -ne 0 ]; then error_sound @@ -35,10 +49,12 @@ function build_gffs() function rebuild_gffs() { - if [ -z "$GENII_INSTALL_DIR" ]; then - echo GENII_INSTALL_DIR is not set. - return 1 - fi + eval $GFFS_CHECK_VARS +# if [ -z "$GENII_INSTALL_DIR" -o -z "$XSEDE_TEST_ROOT" ]; then +# echo GENII_INSTALL_DIR is not set. +# return 1 +# fi + zapem pushd "$GENII_INSTALL_DIR" ant clean @@ -53,6 +69,7 @@ function rebuild_gffs() # a shortcut for doing a new build and creating a bootstrap container with it. function rebu_bootstrap() { + eval $GFFS_CHECK_VARS rebuild_gffs if [ $? -ne 0 ]; then echo "failed to rebuild gffs code"; return 1; fi @@ -74,6 +91,7 @@ function rebu_bootstrap() # a shortcut for building without a clean, and creating a bootstrap container with the code. function bu_bootstrap() { + eval $GFFS_CHECK_VARS build_gffs if [ $? -ne 0 ]; then echo "failed to rebuild gffs code"; return 1; fi @@ -95,7 +113,8 @@ function bu_bootstrap() # a shortcut for doing a quick build and then creating an installer. function fast_install_build() { - bash "$GENII_INSTALL_DIR/xsede_tools/tools/installer/fast_installer_build.sh" $* + eval $GFFS_CHECK_VARS + bash "$XSEDE_TEST_ROOT/tools/installer/fast_installer_build.sh" $* if [ $? -ne 0 ]; then echo "failed to create the installer." error_sound -- 2.34.1