Skip to content

Commit

Permalink
A bit better logging
Browse files Browse the repository at this point in the history
  • Loading branch information
Asger Askov Blekinge committed May 25, 2012
1 parent 14044cd commit 2550823
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/main/profileValidator/validateXmlWithProfile.sh
Expand Up @@ -18,7 +18,7 @@ source $SCRIPT_PATH/logging.sh

breakup() {
if [ -n "$1" ]; then
error "$1"
error "$*"
rm -r $TEMPDIR
exit 1
fi
Expand All @@ -44,11 +44,12 @@ ERRORS=`xsltproc $TEMPDIR/step3.xsl $XML 2> $TEMPDIR/result.xml 2>&1`
breakup "$ERRORS"

if [ -s $TEMPDIR/result.xml ]; then
error "`cat $TEMPDIR/result.xml`"
cat $TEMPDIR/result.xml
rm -r $TEMPDIR
else
echo "{"
echo "\"valid\" : true"
echo "}"
rm -r $TEMPDIR
fi
fi

0 comments on commit 2550823

Please sign in to comment.