fsfe-website/build/misc.sh
Reinhard Müller 785d03c6b9
All checks were successful
continuous-integration/drone/push Build is passing
Remove some spaghetti from build script
2020-04-24 08:52:01 +02:00

24 lines
448 B
Bash
Executable File

#!/usr/bin/env bash
inc_misc=true
[ -z "$inc_logging" ] && . "$basedir/build/logging.sh"
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
}