From 4ca41a13571a363a22bf25ce139353c1bb976c17 Mon Sep 17 00:00:00 2001 From: jahway603 Date: Mon, 1 Mar 2021 03:07:03 -0500 Subject: [PATCH] added help2man check in gen-manpages.sh --- contrib/devtools/gen-manpages.sh | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/contrib/devtools/gen-manpages.sh b/contrib/devtools/gen-manpages.sh index 4acce0959..f4f569710 100755 --- a/contrib/devtools/gen-manpages.sh +++ b/contrib/devtools/gen-manpages.sh @@ -1,5 +1,5 @@ #!/bin/sh -# Copyright (c) 2016-2020 The Hush developers +# Copyright (c) 2016-2021 The Hush developers # Released under the GPLv3 TOPDIR=${TOPDIR:-$(git rev-parse --show-toplevel)} @@ -12,6 +12,15 @@ HUSHTX=${HUSHTX:-$SRCDIR/hush-tx} [ ! -x $HUSHD ] && echo "$HUSHD not found or not executable." && exit 1 +# Check if help2man is installed +# If not then display error to user and exit +if ! command -v help2man &> /dev/null +then + echo "help2man could not be found" + echo "Please install from your Linux package manager and try again" + exit +fi + # use this if hushd is not running #HUSHVER="v3.6.2" HUSHVER=$(./src/hushd --version|head -n1|cut -d' ' -f4|cut -d- -f1)