In my tdb create script, I have several steps (loading, text indexing etc.) 
building on each other, and I want the whole script to abort when an error 
occurs. Therefore, I've introduce return value checks like this:

# since output is piped to tee, the return value of the originating program
               # has to be considered
               set -o pipefail

$JENAROOT/bin/tdb2.xloader $XLOADER_OPTS --loc=/var/lib/fuseki/databases/temp 
$FILE 2>&1 | tee -a $LOG
               if [ $? -eq 0 ]
then
echo `date +"%Y-%m-%d %T"` finished loading $FILE >> $LOG
echo "" >> $LOG
else
echo `date +"%Y-%m-%d %T"` ABORTED >> $LOG
exit 1
fi

               # ...

               # text indexing

With tdb2.xloader as well as fuseki jena.textindexer, I got the ABORTED, though 
apparently all went well.

Probably I make a simple fault here, but I couldn't figure out.

Cheers, Joachim

Reply via email to