3 # Build all the SVG files for Project Aon in a single run
5 # (c) 2011 Javier Fernandez-Sanguino <jfs@computer.org>
7 # This script is provided with the same license as that one
8 # used in the Aon Project
13 [ -z "$AONDIR" ] && AONDIR="../../"
14 [ -z "$LANGS" ] && LANGS="en es"
15 LOGDIR="$CURDIR/logs/"
16 [ ! -e "$LOGDIR" ] && mkdir $LOGDIR
25 ls ${AONDIR}/${lang}/xml/$1.xml |
27 if [ -r "$file" ]; then
28 xml=`basename $file | sed -e 's/\.xml//'`
29 # Look for the XML name in the metadata file
30 if grep -q ^$xml $METADATA; then
31 echo -n "Generating SVG for $xml ('$lang' language)..."
32 LOGFILE=$LOGDIR/$xml.svg.log
35 perl common/scripts/gbtosvg.pl --language=$lang $xml >$LOGFILE 2>&1
37 echo " ERROR building SVG file (review $LOGFILE)"
41 echo "WARN: Do not find metadata for $xml in $METADATA"
44 echo "ERROR: Cannot generate SVG file for $xml (not readable)"
49 for lang in $LANGS; do
50 METADATA=${AONDIR}/${lang}/.publisher/rules/simple
51 if [ -e "$METADATA" ] ; then
52 generate_files "$BOOKS"
54 echo "ERROR: Cannot find the publisher rules at $METADATA for $lang"