jena-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rve...@apache.org
Subject [08/18] jena git commit: Check for return codes from children in tdbloader2 (JENA-977)
Date Tue, 07 Jul 2015 12:53:07 GMT
Check for return codes from children in tdbloader2 (JENA-977)

Ensures that the main script checks for the return code of the child
scripts and aborts if they fail


Project: http://git-wip-us.apache.org/repos/asf/jena/repo
Commit: http://git-wip-us.apache.org/repos/asf/jena/commit/cc4a80ac
Tree: http://git-wip-us.apache.org/repos/asf/jena/tree/cc4a80ac
Diff: http://git-wip-us.apache.org/repos/asf/jena/diff/cc4a80ac

Branch: refs/heads/master
Commit: cc4a80ac3c44d738a8904ac91b1ece71b446d74a
Parents: a7ac279
Author: Rob Vesse <rvesse@apache.org>
Authored: Tue Jun 30 14:25:46 2015 +0100
Committer: Rob Vesse <rvesse@apache.org>
Committed: Tue Jun 30 14:29:52 2015 +0100

----------------------------------------------------------------------
 apache-jena/bin/tdbloader2 | 32 ++++++++++++++++++++++++++++----
 1 file changed, 28 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/jena/blob/cc4a80ac/apache-jena/bin/tdbloader2
----------------------------------------------------------------------
diff --git a/apache-jena/bin/tdbloader2 b/apache-jena/bin/tdbloader2
index 310ee66..d0d906c 100755
--- a/apache-jena/bin/tdbloader2
+++ b/apache-jena/bin/tdbloader2
@@ -198,14 +198,38 @@ TIME1="$(date +%s)"
 TOOL_DIR="$JENA_HOME/bin"
 case "$PHASE" in
   all)
-    exec "${TOOL_DIR}/tdbloader2data" $COMMON_ARGS --loc "$LOC" "$@"
-    exec "${TOOL_DIR}/tdbloader2index" $COMMON_ARGS --loc "$LOC"
+    # All Phases
+    # Data Phase
+    "${TOOL_DIR}/tdbloader2data" $COMMON_ARGS --loc "$LOC" "$@"
+    RET=$?
+    if [ $RET -ne 0 ]; then
+      abort $RET "Failed during data phase"
+    fi
+
+    # Index Phase
+    "${TOOL_DIR}/tdbloader2index" $COMMON_ARGS --loc "$LOC"
+    RET=$?
+    if [ $RET -ne 0 ]; then
+      abort $RET "Failed during data phase"
+    fi
     ;;
+
   data)
-    exec "${TOOL_DIR}/tdbloader2data" $COMMON_ARGS --loc "$LOC" "$@"
+    # Data Phase
+    "${TOOL_DIR}/tdbloader2data" $COMMON_ARGS --loc "$LOC" "$@"
+    RET=$?
+    if [ $RET -ne 0 ]; then
+      abort $RET "Failed during data phase"
+    fi
     ;;
+
   index)
-    exec "${TOOL_DIR}/tdbloader2index" $COMMON_ARGS --loc "$LOC"
+    # Index Phase
+    "${TOOL_DIR}/tdbloader2index" $COMMON_ARGS --loc "$LOC"
+    RET=$?
+    if [ $RET -ne 0 ]; then
+      abort $RET "Failed during index phase"
+    fi
     ;;
   *)
     abort 1 "Unrecognized phase $PHASE"


Mime
View raw message