winfsp/tools/gendoc/apidoc.sh
2020-03-23 15:03:22 -07:00

23 lines
600 B
Bash

#!/bin/bash
cd $(dirname "$0")/../..
PRETTYDOC="$PWD/../prettydoc/prettydoc"
if [[ $# -eq 0 ]]; then
echo "usage: $(basename $0) {asciidoc|html|markdown}" 1>&2
exit 1
fi
"$PRETTYDOC" -f $1 -t --no-timestamp -H=--outer-names-only -o doc inc/winfsp/winfsp.h inc/winfsp/launch.h
if [[ "$1" == "asciidoc" ]]; then
mv doc/winfsp.h.asciidoc doc/WinFsp-API-winfsp.h.asciidoc
mv doc/launch.h.asciidoc doc/WinFsp-API-launch.h.asciidoc
fi
if [[ "$1" == "markdown" ]]; then
mv doc/winfsp.h.markdown doc/WinFsp-API-winfsp.h.md
mv doc/launch.h.markdown doc/WinFsp-API-launch.h.md
fi