diff options
Diffstat (limited to 'generate-manpages/functions.sh')
-rwxr-xr-x | generate-manpages/functions.sh | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/generate-manpages/functions.sh b/generate-manpages/functions.sh new file mode 100755 index 0000000..ded09f2 --- /dev/null +++ b/generate-manpages/functions.sh @@ -0,0 +1,18 @@ +#!/bin/sh + +# Sanity check, check that the non-builtin echo exists and is in PATH +if ! which echo > /dev/null 2>&1; then + echo "$0: This script needs the non-builtin echo, which is not in your PATH." >&2 + echo "$0: Fix PATH or install before running this script!" >&2 + exit 1 +fi + +ECHO=$(which echo) + +print() { + ${ECHO} "$@" +} + +error() { + ${ECHO} "$@" >&2 +} |