summaryrefslogtreecommitdiff
path: root/doc/man/create_manpage.sh
blob: acac83a17a782df8da785ca5efc59a7196d7c60d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
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