fix build on eoan

This commit is contained in:
Marc Wäckerlin
2019-10-08 00:17:54 +02:00
parent 2133615a4c
commit 6d81df1678
16 changed files with 1283 additions and 387 deletions

View File

@@ -1,5 +1,7 @@
#!/bin/bash -e
# documentation: run with option --help
##########################################################################################
#### template for bash scripts #### START BELOW ##########################################
##########################################################################################
@@ -45,25 +47,25 @@ message() {
# write a success message
success() {
echo -n "${bold}${green}success" 1>&2
append_msg $* 1>&2
append_msg "$*" 1>&2
}
# write a notice
notice() {
echo -n "${bold}${yellow}notice" 1>&2
append_msg $* 1>&2
append_msg "$*" 1>&2
}
# write a warning message
warning() {
echo -en "${bold}${red}warning" 1>&2
append_msg $* 1>&2
append_msg "$*" 1>&2
}
# write error message
error() {
echo -en "${bold}${red}error" 1>&2
append_msg $* 1>&2
append_msg "$*" 1>&2
}
# run a command, print the result and abort in case of error
@@ -91,9 +93,10 @@ run() {
exit 1
else
warning "ignored return code: $res"
return 0
fi
else
success
return 1
fi
}
@@ -119,7 +122,6 @@ function traperror() {
exit $e
fi
done
success
exit 0
}
@@ -135,7 +137,7 @@ trap 'traperror "$? ${PIPESTATUS[@]}" $LINENO $BASH_LINENO "$BASH_COMMAND" "${FU
######################################################### commandline parameter evaluation
while test $# -gt 0; do
case "$1" in
(--help|-h) less <<EOF
(--help|-h) cat <<EOF
SYNOPSIS
$0 [OPTIONS]
@@ -157,4 +159,3 @@ EOF
done
##################################################################################### Main