build-man-pages.sh
1 #!/bin/sh 2 3 set -e 4 5 main() { 6 if [ $# -lt 2 ]; then 7 echo "usage: $0 <output-dir> <input-file>..." 8 exit 1 9 fi 10 11 outdir="$1" 12 shift 13 14 for input in "$@"; do 15 echo "Building $input.." 16 asciidoctor --doctype manpage --backend manpage --destination-dir "$outdir" "$input" 17 done 18 } 19 20 main "$@"