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 <treeze.taeung@gmail.com>
This commit is contained in:
Taeung Song 2018-02-02 21:51:57 +09:00
parent 9a270e2dae
commit 72f92cf986
No known key found for this signature in database
GPG Key ID: 42451AA088447724
1 changed files with 5 additions and 0 deletions

View File

@ -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}"