Skip to content

Commit 6e2607c

Browse files
committed
Rename bin/md2man to bin/go-md2man
In the recent PR !2877, some code was added to check if md2man is already installed in the build environment. This is to cater to the needs of Linux distributions. However it turns out that Linux distributions install md2man as bin/go-md2man instead of bin/md2man, hence the PR !2877 doesn't help much. This commit fixes it by settling on using the binary name go-md2man. For reference, here the file list of the package go-md2man in several distributions: - Debian: <https://packages.debian.org/sid/amd64/go-md2man/filelist> - Ubuntu: <https://packages.ubuntu.com/hirsute/amd64/go-md2man/filelist> - Fedora: <https://fedora.pkgs.org/31/fedora-x86_64/golang-github-cpuguy83-md2man-2.0.0-0.4.20190624gitf79a8a8.fc31.x86_64.rpm.html> - ArchLinux: <https://www.archlinux.org/packages/community/x86_64/go-md2man/> Signed-off-by: Arnaud Rebillout <elboulangero@gmail.com>
1 parent 831ebea commit 6e2607c

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

man/md2man-all.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,5 +18,5 @@ for FILE in *.md; do
1818
continue
1919
fi
2020
mkdir -p "./man${num}"
21-
md2man -in "$FILE" -out "./man${num}/${name}"
21+
go-md2man -in "$FILE" -out "./man${num}/${name}"
2222
done

scripts/docs/generate-man.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@ set -eu -o pipefail
44

55
mkdir -p ./man/man1
66

7-
if ! command -v md2man &> /dev/null; then
7+
if ! command -v go-md2man &> /dev/null; then
88
# yay, go install creates a binary named "v2" ¯\_(ツ)_/¯
9-
go build -o "/go/bin/md2man" ./vendor/github.com/cpuguy83/go-md2man/v2
9+
go build -o "/go/bin/go-md2man" ./vendor/github.com/cpuguy83/go-md2man/v2
1010
fi
1111

1212
# Generate man pages from cobra commands

0 commit comments

Comments
 (0)