From 72f92cf9864bf2233d1fc3ea2dd91ca8e77a510f Mon Sep 17 00:00:00 2001 From: Taeung Song Date: Fri, 2 Feb 2018 21:51:57 +0900 Subject: [PATCH] Warning message if 'go-md2man' is not yet installed If 'go-md2man' is not installed, an error can occur when running md2man-all.sh like below: $ ./man/md2man-all.sh -q ./man/md2man-all.sh: line 21: go-md2man: command not found So fix it. Signed-off-by: Taeung Song --- man/md2man-all.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/man/md2man-all.sh b/man/md2man-all.sh index 97c65c93..f850ddf3 100755 --- a/man/md2man-all.sh +++ b/man/md2man-all.sh @@ -9,6 +9,11 @@ cd "$(dirname "$(readlink -f "$BASH_SOURCE")")" pwd } +if ! ( which go-md2man &>/dev/null ); then + echo "To install man pages, please install 'go-md2man'." + exit 0 +fi + for FILE in *.md; do base="$(basename "$FILE")" name="${base%.md}"