summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorRichard Laager <[email protected]>2019-05-05 16:45:56 -0500
committerBrian Behlendorf <[email protected]>2019-05-08 10:59:32 -0700
commite7ce9759accfe973027a20928b1e2af46058190a (patch)
tree6783bac7f29c749675b1c0cab16cc85790d91aff /scripts
parenta20f43b51ba87d4932f897e23cf9af181d4d1374 (diff)
Correct man page dates
Various changes (many by me) have been made to the man pages without bumping their dates. I have now corrected them based on the last commit to each file. I also added the script I used to make these changes. Reviewed-by: Olaf Faaland <[email protected]> Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Richard Laager <[email protected]> Closes #8710
Diffstat (limited to 'scripts')
-rw-r--r--scripts/Makefile.am1
-rwxr-xr-xscripts/man-dates.sh12
2 files changed, 13 insertions, 0 deletions
diff --git a/scripts/Makefile.am b/scripts/Makefile.am
index de0d4795d..18a9449cf 100644
--- a/scripts/Makefile.am
+++ b/scripts/Makefile.am
@@ -15,6 +15,7 @@ EXTRA_DIST = \
enum-extract.pl \
kmodtool \
make_gitrev.sh \
+ man-dates.sh \
paxcheck.sh \
zfs2zol-patch.sed \
cstyle.pl
diff --git a/scripts/man-dates.sh b/scripts/man-dates.sh
new file mode 100755
index 000000000..186d94639
--- /dev/null
+++ b/scripts/man-dates.sh
@@ -0,0 +1,12 @@
+#!/bin/sh
+
+# This script updates the date lines in the man pages to the date of the last
+# commit to that file.
+
+set -eu
+
+find man -type f | while read -r i ; do
+ git_date=$(git log -1 --date=short --format="%ad" -- "$i")
+ [ "x$git_date" = "x" ] && continue
+ sed -i "s|^\.Dd.*|.Dd $(date -d "$git_date" "+%B %-d, %Y")|" "$i"
+done