Reinhard Müller 26e29088f3
All checks were successful
the build was successful
Fix handling of XML parser errors
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.
2019-02-16 09:53:32 +01:00

32 lines
529 B
Bash
Executable File

#!/bin/bash
inc_misc=true
[ -z "$inc_logging" ] && . "$basedir/build/logging.sh"
print_help(){
cat "$basedir/build/HELP"
}
match(){
printf %s "$1" |egrep -q "$2"
}
debug(){
if [ "$#" -ge 1 ]; then
echo "$(date '+%F %T'): $@" |logappend debug >&2
else
logappend debug >&2
fi
}
print_error(){
echo "Error - $@" |logappend lasterror >&2
echo "Run '$0 --help' to see usage instructions" >&2
}
die(){
echo "$(date '+%F %T'): Fatal - $@" |logappend lasterror >&2
date +%s |logstatus end_time
exit 1
}