diff options
author | Matt Macy <mmacy@FreeBSD.org> | 2020-08-24 23:31:26 +0000 |
---|---|---|
committer | Matt Macy <mmacy@FreeBSD.org> | 2020-08-24 23:31:26 +0000 |
commit | eda14cbc264d6969b02f2b1994cef11148e914f1 (patch) | |
tree | 54766ce51e901d5ec66cdce87973bb1e210588e1 /sys/contrib/openzfs/scripts/man-dates.sh | |
parent | 8d9b400f9d02116e528968fa4e7d3c479e326e2a (diff) | |
parent | 3b0ce0e28db46d0403929aba45c682285e1ac217 (diff) | |
download | src-eda14cbc264d6969b02f2b1994cef11148e914f1.tar.gz src-eda14cbc264d6969b02f2b1994cef11148e914f1.zip |
Initial import from vendor-sys branch of openzfs
Notes
Notes:
svn path=/head/; revision=364740
Diffstat (limited to 'sys/contrib/openzfs/scripts/man-dates.sh')
-rwxr-xr-x | sys/contrib/openzfs/scripts/man-dates.sh | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/sys/contrib/openzfs/scripts/man-dates.sh b/sys/contrib/openzfs/scripts/man-dates.sh new file mode 100755 index 000000000000..186d94639a56 --- /dev/null +++ b/sys/contrib/openzfs/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 |