aboutsummaryrefslogtreecommitdiffstats
path: root/src/man/mkman.sh
diff options
context:
space:
mode:
authorLibravatar Kelvin M. Klann <kmk3.code@protonmail.com>2023-07-12 01:55:07 -0300
committerLibravatar Kelvin M. Klann <kmk3.code@protonmail.com>2023-07-13 11:43:53 -0300
commit76bd5ad0f8347bc111c30f67b2eb151c2e5870ed (patch)
tree3fd235c83d6ce45451abc80dca27420203d3aad6 /src/man/mkman.sh
parentbuild: restore seccomp filter targets (diff)
downloadfirejail-76bd5ad0f8347bc111c30f67b2eb151c2e5870ed.tar.gz
firejail-76bd5ad0f8347bc111c30f67b2eb151c2e5870ed.tar.zst
firejail-76bd5ad0f8347bc111c30f67b2eb151c2e5870ed.zip
build: simplify code related to man pages
Simplify the main targets and use wildcards instead of repeating the filenames manually. Also, restore the `man` target and building only when `HAVE_MAN` is enabled. Note: Make automatically removes intermediate files (.1 and .5), so in general only the .gz files have to be cleaned. Commands used to rename the man pages: cd src/man git mv firecfg.txt firecfg.1.in git mv firejail-login.txt firejail-login.5.in git mv firejail-profile.txt firejail-profile.5.in git mv firejail-users.txt firejail-users.5.in git mv firejail.txt firejail.1.in git mv firemon.txt firemon.1.in git mv jailcheck.txt jailcheck.1.in This is kind of a follow-up to commit 9e206b7f2 ("rework src/man Makefile", 2023-07-07).
Diffstat (limited to 'src/man/mkman.sh')
-rwxr-xr-xsrc/man/mkman.sh8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/man/mkman.sh b/src/man/mkman.sh
index b538b0126..0302e0778 100755
--- a/src/man/mkman.sh
+++ b/src/man/mkman.sh
@@ -5,8 +5,10 @@
5 5
6set -e 6set -e
7 7
8sed -i "s/VERSION/$1/g" "$2"
9MONTH="$(LC_ALL=C date -u --date="@${SOURCE_DATE_EPOCH:-$(date +%s)}" +%b)" 8MONTH="$(LC_ALL=C date -u --date="@${SOURCE_DATE_EPOCH:-$(date +%s)}" +%b)"
10sed -i "s/MONTH/$MONTH/g" "$2"
11YEAR="$(LC_ALL=C date -u --date="@${SOURCE_DATE_EPOCH:-$(date +%s)}" +%Y)" 9YEAR="$(LC_ALL=C date -u --date="@${SOURCE_DATE_EPOCH:-$(date +%s)}" +%Y)"
12sed -i "s/YEAR/$YEAR/g" "$2" 10
11sed \
12 -e "s/VERSION/$1/g" \
13 -e "s/MONTH/$MONTH/g" \
14 -e "s/YEAR/$YEAR/g"