summaryrefslogtreecommitdiffstats
path: root/generate-manpages/functions.sh
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-15 17:23:08 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-15 17:23:08 +0000
commitdd76e45c20acc3f352ffe8257208cc617ba33eba (patch)
treec50c016a4182a27fd1ece9ec7ba4abf405f19e5f /generate-manpages/functions.sh
parentInitial commit. (diff)
downloadsquashfs-tools-upstream.tar.xz
squashfs-tools-upstream.zip
Adding upstream version 1:4.6.1.upstream/1%4.6.1upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rwxr-xr-xgenerate-manpages/functions.sh18
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
+}