Skip to content

Commit

Permalink
Build manpages
Browse files Browse the repository at this point in the history
  • Loading branch information
mattmc3 committed Jul 16, 2024
1 parent 3c463cb commit 2ddee05
Show file tree
Hide file tree
Showing 12 changed files with 26 additions and 12 deletions.
2 changes: 1 addition & 1 deletion man/man1/antidote-bundle.1
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
.\" Automatically generated by Pandoc 3.1.12.2
.\" Automatically generated by Pandoc
.\"
.TH "antidote\-bundle" "1" "" "" "Antidote Manual"
.SH NAME
Expand Down
2 changes: 1 addition & 1 deletion man/man1/antidote-help.1
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
.\" Automatically generated by Pandoc 3.1.12.2
.\" Automatically generated by Pandoc
.\"
.TH "antidote\-help" "1" "" "" "Antidote Manual"
.SH NAME
Expand Down
2 changes: 1 addition & 1 deletion man/man1/antidote-home.1
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
.\" Automatically generated by Pandoc 3.1.12.2
.\" Automatically generated by Pandoc
.\"
.TH "antidote\-home" "1" "" "" "Antidote Manual"
.SH NAME
Expand Down
2 changes: 1 addition & 1 deletion man/man1/antidote-init.1
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
.\" Automatically generated by Pandoc 3.1.12.2
.\" Automatically generated by Pandoc
.\"
.TH "antidote\-init" "1" "" "" "Antidote Manual"
.SH NAME
Expand Down
2 changes: 1 addition & 1 deletion man/man1/antidote-install.1
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
.\" Automatically generated by Pandoc 3.1.12.2
.\" Automatically generated by Pandoc
.\"
.TH "antidote\-install" "1" "" "" "Antidote Manual"
.SH NAME
Expand Down
2 changes: 1 addition & 1 deletion man/man1/antidote-list.1
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
.\" Automatically generated by Pandoc 3.1.12.2
.\" Automatically generated by Pandoc
.\"
.TH "antidote\-list" "1" "" "" "Antidote Manual"
.SH NAME
Expand Down
2 changes: 1 addition & 1 deletion man/man1/antidote-load.1
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
.\" Automatically generated by Pandoc 3.1.12.2
.\" Automatically generated by Pandoc
.\"
.TH "antidote\-load" "1" "" "" "Antidote Manual"
.SH NAME
Expand Down
2 changes: 1 addition & 1 deletion man/man1/antidote-path.1
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
.\" Automatically generated by Pandoc 3.1.12.2
.\" Automatically generated by Pandoc
.\"
.TH "antidote\-path" "1" "" "" "Antidote Manual"
.SH NAME
Expand Down
2 changes: 1 addition & 1 deletion man/man1/antidote-purge.1
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
.\" Automatically generated by Pandoc 3.1.12.2
.\" Automatically generated by Pandoc
.\"
.TH "antidote\-purge" "1" "" "" "Antidote Manual"
.SH NAME
Expand Down
2 changes: 1 addition & 1 deletion man/man1/antidote-update.1
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
.\" Automatically generated by Pandoc 3.1.12.2
.\" Automatically generated by Pandoc
.\"
.TH "antidote\-update" "1" "" "" "Antidote Manual"
.SH NAME
Expand Down
6 changes: 5 additions & 1 deletion man/man1/antidote.1
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
.\" Automatically generated by Pandoc 3.1.12.2
.\" Automatically generated by Pandoc
.\"
.TH "antidote" "1" "" "" "Antidote Manual"
.SH NAME
Expand Down Expand Up @@ -232,6 +232,10 @@ zcompile `no'
The static file can be Zsh compiled with the following \f[B]zstyle\f[R]:
.PP
\ \ zstyle `:antidote:static' zcompile `yes'
.PP
Or, to Zsh compile everything, static file and all bundles:
.PP
\ \ zstyle \[cq]:antidote:*\[cq] zcompile `yes'
.SH SEE ALSO
For more information, visit https://getantidote.github.io/
.SH BUGS
Expand Down
12 changes: 11 additions & 1 deletion tools/buildman
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ TMPDIR=$BASEDIR/.tmp/buildman
[[ -d $TMPDIR ]] && rm -rf $TMPDIR
mkdir -p $TMPDIR

sedi() {
sed --version &> /dev/null && sed -i -- "$@" || sed -i "" "$@"
}

for manpage in $BASEDIR/man/*.md; do
case ${manpage:t:r} in
footer|example) continue ;;
Expand All @@ -22,5 +26,11 @@ for manpage in $BASEDIR/man/*.md; do
print "" >> $mdfile
cat $BASEDIR/man/footer.md >> $mdfile

pandoc --standalone --to man ${mdfile} -o $BASEDIR/man/man1/${manpage:t:r}.1
manfile=$BASEDIR/man/man1/${manpage:t:r}.1
pandoc --standalone --to man ${mdfile} -o $manfile

# strip pandoc version so that every manpage build doesn't need to
# result in a new commit just b/c pandoc has a minor point release.
pandoc_ver=$(pandoc -v | awk 'NR==1{print $2}')
sedi "s/Pandoc $pandoc_ver/Pandoc/g" $manfile
done

0 comments on commit 2ddee05

Please sign in to comment.