]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - scripts/man-dates.sh
zfs get: add '-t fs' and '-t vol' options
[FreeBSD/FreeBSD.git] / scripts / man-dates.sh
1 #!/bin/sh
2
3 # This script updates the date lines in the man pages to the date of the last
4 # commit to that file.
5
6 set -eu
7
8 find man -type f | while read -r i ; do
9     git_date=$(git log -1 --date=short --format="%ad" -- "$i")
10     [ -z "$git_date" ] && continue
11     sed -i "s|^\.Dd.*|.Dd $(date -d "$git_date" "+%B %-d, %Y")|" "$i"
12 done