Fix handling of XML parser errors
All checks were successful
the build was successful

This change makes sure that the build script will stop if an XML parser
error occures, and the faulty build will not be propagated to the web
server. Please note that it requires switching all the shell scripts to
bash.
This commit is contained in:
Reinhard Müller 2019-02-16 09:53:32 +01:00
parent 2251065e5b
commit 26e29088f3
18 changed files with 22 additions and 18 deletions

View File

@ -1,4 +1,4 @@
#!/bin/sh
#!/bin/bash
[ -z "$inc_misc" ] && . "$basedir/build/misc.sh"

View File

@ -1,4 +1,4 @@
#!/bin/sh
#!/bin/bash
# Check dependencies
deperrors=''

View File

@ -1,4 +1,4 @@
#!/bin/sh
#!/bin/bash
inc_buildrun=true
[ -z "$inc_makerules" ] && . "$basedir/build/makerules.sh"

View File

@ -1,4 +1,4 @@
#!/bin/sh
#!/bin/bash
inc_filenames=true
[ -z "$inc_languages" ] && . "$basedir/build/languages.sh"

View File

@ -1,4 +1,4 @@
#!/bin/sh
#!/bin/bash
inc_fundraising=true
[ -z "$inc_filenames" ] && . "$basedir/build/filenames.sh"

View File

@ -1,4 +1,4 @@
#!/bin/sh
#!/bin/bash
# lazy-ass include guard
inc_languages=true

View File

@ -1,4 +1,4 @@
#!/bin/sh
#!/bin/bash
inc_logging=true

View File

@ -1,4 +1,4 @@
#!/bin/sh
#!/bin/bash
inc_makerules=true
[ -z "$inc_misc" ] && . "$basedir/build/misc.sh"

View File

@ -1,4 +1,4 @@
#!/bin/sh
#!/bin/bash
inc_misc=true
[ -z "$inc_logging" ] && . "$basedir/build/logging.sh"

View File

@ -1,4 +1,4 @@
#!/bin/sh
#!/bin/bash
basedir="${0%/*}/.."
[ -z "$inc_processor" ] && . "$basedir/build/processor.sh"

View File

@ -1,4 +1,4 @@
#!/bin/sh
#!/bin/bash
inc_processor=true
[ -z "$inc_filenames" ] && . "$basedir/build/filenames.sh"
@ -13,6 +13,10 @@ process_file(){
lang=$(get_language "$infile")
[ -z "$processor" ] && processor="$(get_processor "$shortname")"
# Make sure that the following pipe exits with a nonzero exit code if *any*
# of the commands fails.
set -o pipefail
build_xmlstream "$shortname" "$lang" "$olang" \
| xsltproc "$processor" - \
| sed -r ':X; N; $!bX;

View File

@ -1,4 +1,4 @@
#!/bin/sh
#!/bin/bash
inc_scaffold=true
[ -z "$inc_xmlfiles" ] && . "$basedir/build/xmlfiles.sh"

View File

@ -1,4 +1,4 @@
#!/bin/sh
#!/bin/bash
basedir="${0%/*}/.."
[ -z "$inc_sources" ] && . "$basedir/build/sources.sh"

View File

@ -1,4 +1,4 @@
#!/bin/sh
#!/bin/bash
inc_sources=true
[ -z "$inc_xmlfiles" ] && . "$basedir/build/xmlfiles.sh"

View File

@ -1,4 +1,4 @@
#!/bin/sh
#!/bin/bash
exec 2>/dev/null

View File

@ -1,4 +1,4 @@
#!/bin/sh
#!/bin/bash
inc_stirrups=true
[ -z "$inc_misc" ] && . "$basedir/build/misc.sh"

View File

@ -1,4 +1,4 @@
#!/bin/sh
#!/bin/bash
inc_translations=true
[ -z "$inc_filenames" ] && . "$basedir/build/filenames.sh"

View File

@ -1,4 +1,4 @@
#!/bin/sh
#!/bin/bash
inc_xmlfiles=true