add manpage builder
This commit is contained in:
parent
cd74520662
commit
cdb98adcd3
3 changed files with 32 additions and 1 deletions
14
bin/create-manpage.sh
Executable file
14
bin/create-manpage.sh
Executable file
|
|
@ -0,0 +1,14 @@
|
|||
#!/bin/sh
|
||||
|
||||
(
|
||||
printf ".TH expiration-check 1 \"%s\" \"Manual of expiration-check\"\n" "$(date +'%Y-%m-%d')"
|
||||
printf ".LO 1\n"
|
||||
|
||||
./build/expiration-check-linux-amd64 -h \
|
||||
| sed -E 's/^([A-Z ]+):$/.SH \1/g' \
|
||||
| sed -E 's/^ (.+) (.+)/.TP\n.B \1\n\2\n\n/g' \
|
||||
| sed -E 's/^ (\w+)/\1/g' \
|
||||
| sed -E 's/\\{0}-([a-z]+)/\\-\1/g' \
|
||||
| sed -E 's/-\\-/\\-\\-/g' \
|
||||
| sed -E 's/\s+$//g'
|
||||
) | gzip -9 > ./build/expiration-check.1.gz
|
||||
Loading…
Add table
Add a link
Reference in a new issue