man/md2man-all.sh
0a0dd116
 #!/bin/bash
e55ed741
 set -e
 
 # get into this script's directory
 cd "$(dirname "$(readlink -f "$BASH_SOURCE")")"
 
 [ "$1" = '-q' ] || {
 	set -x
 	pwd
 }
 
f763075c
 for FILE in *.md; do
 	base="$(basename "$FILE")"
 	name="${base%.md}"
 	num="${name##*.}"
d561fe6d
 	if [ -z "$num" -o "$name" = "$num" ]; then
f763075c
 		# skip files that aren't of the format xxxx.N.md (like README.md)
 		continue
 	fi
fa3ac2d3
 	mkdir -p "./man${num}"
3f136dc0
 	go-md2man -in "$FILE" -out "./man${num}/${name}"
e55ed741
 done