corrected CONTRIBUTING & README

This commit is contained in:
Georg Lauterbach 2020-12-22 11:08:50 +01:00
parent 7517315b85
commit 2020df88fe
No known key found for this signature in database
GPG key ID: 2FDC58699AF121C6
2 changed files with 11 additions and 7 deletions

View file

@ -125,13 +125,15 @@ A construct to trace error in your scripts looks like this. Remember: Remove `se
set -xeuEo pipefail
trap '__log_err ${FUNCNAME[0]:-"?"} ${_:-"?"} ${LINENO:-"?"} ${?:-"?"}' ERR
SCRIPT='NAME OF THIS SCRIPT'
function __log_err
{
printf "\n \e[1m\e[31mUNCHECKED ERROR\e[0m\n%s\n%s\n%s\n%s\n\n" \
" script = ${SCRIPT,,:-'UNKNOWN'}.sh" \
" script = ${SCRIPT:-'unknown'}" \
" function = ${1} / ${2}" \
" line = ${3}" \
" exit code = ${4}"
" exit code = ${4}" 1>&2
<CODE TO RUN AFTERWARDS>
}