2017-02-13 14:01:54 -05:00
|
|
|
#!/usr/bin/env bash
|
2017-06-14 16:42:58 -04:00
|
|
|
# Generate man pages for docker/cli
|
|
|
|
set -eu -o pipefail
|
2016-06-09 11:33:28 -04:00
|
|
|
|
|
|
|
mkdir -p ./man/man1
|
|
|
|
|
2020-12-15 22:19:43 -05:00
|
|
|
if ! command -v go-md2man &> /dev/null; then
|
2020-12-09 17:06:18 -05:00
|
|
|
# yay, go install creates a binary named "v2" ¯\_(ツ)_/¯
|
2020-12-15 22:19:43 -05:00
|
|
|
go build -o "/go/bin/go-md2man" ./vendor/github.com/cpuguy83/go-md2man/v2
|
2020-12-09 17:06:18 -05:00
|
|
|
fi
|
2017-05-10 21:24:32 -04:00
|
|
|
|
2016-06-09 11:33:28 -04:00
|
|
|
# Generate man pages from cobra commands
|
2017-06-06 00:59:50 -04:00
|
|
|
go build -o /tmp/gen-manpages github.com/docker/cli/man
|
2017-07-18 08:17:17 -04:00
|
|
|
/tmp/gen-manpages --root "$(pwd)" --target "$(pwd)/man/man1"
|
2016-06-09 11:33:28 -04:00
|
|
|
|
|
|
|
# Generate legacy pages from markdown
|
|
|
|
./man/md2man-all.sh -q
|