summaryrefslogtreecommitdiff
path: root/doc/man/create_manpage.sh
diff options
context:
space:
mode:
authorHéctor Orón Martínez <zumbi@debian.org>2018-08-10 18:07:56 +0200
committerHéctor Orón Martínez <zumbi@debian.org>2018-08-10 18:07:56 +0200
commita3819b2c8c823955bb053d5a34da27c94aef4d47 (patch)
tree430633212532264c15f75ca47e02f3e4740c7c3c /doc/man/create_manpage.sh
parent8ab62bc45ed897f007493d02084538503ade6f37 (diff)
New upstream version 1.0.0+git20180808.5b74d5d
Diffstat (limited to 'doc/man/create_manpage.sh')
-rwxr-xr-xdoc/man/create_manpage.sh28
1 files changed, 28 insertions, 0 deletions
diff --git a/doc/man/create_manpage.sh b/doc/man/create_manpage.sh
new file mode 100755
index 0000000..acac83a
--- /dev/null
+++ b/doc/man/create_manpage.sh
@@ -0,0 +1,28 @@
+#!/bin/bash
+# Create a manpage from the README.md
+
+# Add header
+echo '''% debos(1)
+
+# NAME
+
+ debos - Debian OS images builder
+''' > debos.md
+
+# Add README.md
+tail -n +2 ../../README.md >> debos.md
+
+# Some tweaks to the markdown
+# Uppercase titles
+sed -i 's/^\(##.*\)$/\U\1/' debos.md
+
+# Remove double #
+sed -i 's/^\##/#/' debos.md
+
+# Create the manpage
+pandoc -s -t man debos.md -o debos.1
+
+# Resulting manpage can be browsed with groff:
+#groff -man -Tascii debos.1
+
+