diff options
Diffstat (limited to 'include/lib.sh')
-rwxr-xr-x | include/lib.sh | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/include/lib.sh b/include/lib.sh index 1b0f07c1..8d4b7825 100755 --- a/include/lib.sh +++ b/include/lib.sh @@ -15,6 +15,15 @@ tmpgit="$PWD/tmp/gitclone" grubdata="config/data/grub" err="err_" +badcmd() +{ + errmsg="no context given" + [ $# -gt 0 ] && errmsg="$1" + + dstr="Check $projectname docs via $projectsite" + [ -d "docs" ] && dstr="$dstr (local docs available via docs/)" + $err "Bad command ($errmsg). $dstr" +} err_() { printf "ERROR %s: %s\n" "$0" "$1" 1>&2 |