summaryrefslogtreecommitdiff
path: root/include/lib.sh
diff options
context:
space:
mode:
Diffstat (limited to 'include/lib.sh')
-rwxr-xr-xinclude/lib.sh9
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