From 4c38ac7a04c4334158cd4659ca94682c6e3d89d0 Mon Sep 17 00:00:00 2001 From: DONG Yuxuan Date: Mon, 16 Oct 2023 04:27:10 +0800 Subject: [PATCH] add version section to manpage --- Makefile | 4 +++- shsub.1.tpl | 4 ++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index a31a430..89ffd01 100644 --- a/Makefile +++ b/Makefile @@ -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 diff --git a/shsub.1.tpl b/shsub.1.tpl index aa87f6e..5774179 100644 --- a/shsub.1.tpl +++ b/shsub.1.tpl @@ -55,6 +55,10 @@ Set the path of the output script if \fB-c\fR is enabled Shsub was created by DONG Yuxuan in 2022. +.SH VERSION + +This man page is for Shsub <%="$version"%>. + .SH FURTHER DOCUMENTATION See .