added var function to print out variable values.
[feisty_meow.git] / scripts / buildor / build_xsedes.sh
index f51a037555106108f052ce48f25f6ba207b0c10f..806d8ad7e8ac338584d01ab18e23d0bf725cb88f 100644 (file)
@@ -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
@@ -12,13 +15,8 @@ function build_xsede()
   if [ $? -ne 0 ]; then return 1; fi
   echo "Build starting at: $(date)"
 
-# clean up some things.
-#maybe not needed.
-if [ ! -d unit-test-reports ]; then
-echo this chunk in build_xsedes could be removed to clean up unit tests
-else
-\rm -rf unit-test-reports
-fi
+  # clean up some things.
+  \rm -rf unit-test-reports
 
   # build the trunk.
   ant -Dbuild.targetArch=64 build
@@ -37,6 +35,7 @@ function rebuild_xsede()
   fi
   pushd $GENII_INSTALL_DIR
   ant clean
+
   if [ $? -ne 0 ]; then return 1; fi
   popd
   build_xsede
@@ -46,10 +45,34 @@ function rebuild_xsede()
 function rebu_bootstrap()
 {
   rebuild_xsede 
-  check_result "failed to rebuild xsede code"
+  if [ $? -ne 0 ]; then echo "failed to rebuild xsede code"; return 1; fi
 
   bash $GENII_INSTALL_DIR/xsede_tools/library/bootstrap_quick_start.sh
-  check_result "failed to bootstrap a container"
+  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  
 }