2019-05-05 21:45:56 +00:00
|
|
|
#!/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")
|
2021-06-09 19:21:24 +00:00
|
|
|
[ -z "$git_date" ] && continue
|
2019-05-05 21:45:56 +00:00
|
|
|
sed -i "s|^\.Dd.*|.Dd $(date -d "$git_date" "+%B %-d, %Y")|" "$i"
|
|
|
|
done
|