X-Git-Url: https://feistymeow.org/gitweb/?a=blobdiff_plain;f=scripts%2Fbuildor%2Fgffs_builders.sh;h=556009e6f0ebdff165bbcfb3e5047492512bb6de;hb=350c5e348c3263a4d48307057e2de34166a53b04;hp=21dbb59c739e5b33bf2a429d3df06495d38f76d5;hpb=7e7383cf9baf945f6e86af15f59165003eafc803;p=feisty_meow.git diff --git a/scripts/buildor/gffs_builders.sh b/scripts/buildor/gffs_builders.sh index 21dbb59c..556009e6 100644 --- a/scripts/buildor/gffs_builders.sh +++ b/scripts/buildor/gffs_builders.sh @@ -3,14 +3,28 @@ 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' +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