hudson build: publish work
diff --git a/publish.sh b/publish.sh
index 0587c66..09097ab 100644
--- a/publish.sh
+++ b/publish.sh
@@ -85,6 +85,7 @@
 parseHandoff() {
     handoff_file=$1
     handoff_error_string="Error: Invalid handoff_filename: '${handoff_file}'! Should be 'handoff-file-<PROC>-<BRANCH>-<QUALIFIER>.dat'"
+    handoff_content_error="Error: Invalid handoff_file contents: '`cat ${handoff_file}`'! Should be 'extract.loc=<BUILD_ARCHIVE_LOC> host=<HOST>'"
 
     ## Parse handoff_file for BRANCH, QUALIFIER, and HOST
     BRANCH=`echo ${handoff_file} | cut -s -d'-' -f4`
@@ -102,6 +103,16 @@
         echo "PROC ${handoff_error_string}"
         exit 2
     fi
+    BUILD_ARCHIVE_LOC=`cat ${handoff_file} | cut -d' ' -f1 | cut -d'=' -f2`
+    if [ "${BUILD_ARCHIVE_LOC}" = "" ] ; then
+        echo "BUILD_ARCHIVE_LOC ${handoff_content_error}"
+        exit 2
+    fi
+    HOST=`cat ${handoff_file} | cut -d' ' -f2 | cut -d'=' -f2`
+    if [ "${HOST}" = "" ] ; then
+        echo "HOST ${handoff_content_error}"
+        exit 2
+    fi
     if [ "${DEBUG}" = "true" ] ; then
         echo "BRANCH='${BRANCH}' QUALIFIER='${QUALIFIER}' PROC='${PROC}'"
     fi
@@ -191,8 +202,10 @@
 #==========================
 #  If anything is in ARG1 then do a dummy "DEBUG"
 #  run (Don't call ant, don't remove handoff, do report variable states
-DEBUG=false
-if [ ! "$ARG1" = "" ] ; then
+if [ -z "$ARG1" ] ; then
+    DEBUG=false
+    echo "Debug is off!"
+else
     DEBUG=true
     echo "Debug is on!"
 fi
@@ -206,7 +219,7 @@
     echo "Detected handoff file:'${handoff}'. Process starting..."
     # Do stuff
     parseHandoff ${handoff}
-    runAnt ${BRANCH} ${QUALIFIER} ${PROC}
+    echo "runAnt ${BRANCH} ${QUALIFIER} ${PROC} ${BUILD_ARCHIVE_LOC}"
     postProcess
 done