Skip to content

Commit

Permalink
add version section to manpage
Browse files Browse the repository at this point in the history
  • Loading branch information
dongyx committed Oct 15, 2023
1 parent eadb458 commit 4c38ac7
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
4 changes: 3 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,9 @@ CC = cc
all: shsub

install: all
name='$(name)' ./shsub shsub.1.tpl >shsub.1
name='$(name)' \
version=$$(./shsub --version | head -n1 | awk '{print $$2}') \
./shsub shsub.1.tpl >shsub.1
mkdir -p $(bindir) $(mandir)/man1
$(INSTALL) shsub $(bindir)/$(name)
$(INSTALL) -m644 shsub.1 $(mandir)/man1/$(name).1
Expand Down
4 changes: 4 additions & 0 deletions shsub.1.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,10 @@ Set the path of the output script if \fB-c\fR is enabled
Shsub was created by
DONG Yuxuan <https://www.dyx.name> in 2022.

.SH VERSION

This man page is for Shsub <%="$version"%>.

.SH FURTHER DOCUMENTATION

See <https://github.com/dongyx/shsub>.

0 comments on commit 4c38ac7

Please sign in to comment.