added process zapping before building.
authorChris Koeritz <fred@gruntose.com>
Thu, 6 Aug 2015 17:02:38 +0000 (13:02 -0400)
committerChris Koeritz <fred@gruntose.com>
Thu, 6 Aug 2015 17:02:38 +0000 (13:02 -0400)
scripts/buildor/gffs_builders.sh

index af7273e3d4716d0c6393620b5268007403f409de..f5f15b265af283b3affeadcc66ccdefe746f143a 100644 (file)
@@ -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