diff options
-rw-r--r-- | Documentation/.gitignore | 2 | ||||
-rwxr-xr-x | Documentation/MANPAGE-render.bash | 17 |
2 files changed, 14 insertions, 5 deletions
diff --git a/Documentation/.gitignore b/Documentation/.gitignore new file mode 100644 index 0000000..d2f316c --- /dev/null +++ b/Documentation/.gitignore @@ -0,0 +1,2 @@ +# Generated man pages +*.1 diff --git a/Documentation/MANPAGE-render.bash b/Documentation/MANPAGE-render.bash index 138f4d6..2b7dd80 100755 --- a/Documentation/MANPAGE-render.bash +++ b/Documentation/MANPAGE-render.bash @@ -3,9 +3,16 @@ set -eu cd $(dirname "$0") -OUT=gocryptfs.1 +# Render Markdown to a proper man(1) manpage +function render { + IN=$1 + OUT=$2 + echo "Rendering $IN to $OUT" + echo ".\\\" This is a man page. View it using 'man ./$OUT'" > $OUT + echo ".\\\"" >> $OUT + pandoc MANPAGE.md -s -t man >> $OUT +} + +render MANPAGE.md gocryptfs.1 +render MANPAGE-XRAY.md gocryptfs-xray.1 -# Render MANPAGE.md to a proper man(1) manpage -echo ".\\\" This is a man page. View it using 'man ./$OUT'" > $OUT -echo ".\\\"" >> $OUT -pandoc MANPAGE.md -s -t man >> $OUT && man ./gocryptfs.1 |