config/dracut/90zfs: handle cases where hostid(1) returns all zeros
[zfs.git] / scripts / man-dates.sh
blob186d94639a5651d2ff2c26365ae936b79731b655
1 #!/bin/sh
3 # This script updates the date lines in the man pages to the date of the last
4 # commit to that file.
6 set -eu
8 find man -type f | while read -r i ; do
9 git_date=$(git log -1 --date=short --format="%ad" -- "$i")
10 [ "x$git_date" = "x" ] && continue
11 sed -i "s|^\.Dd.*|.Dd $(date -d "$git_date" "+%B %-d, %Y")|" "$i"
12 done