Date: Wed, 12 Oct 2016 15:49:21 +0000 (UTC) From: Ed Maste <emaste@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r307150 - head/gnu/usr.bin/groff Message-ID: <201610121549.u9CFnL2n054945@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: emaste Date: Wed Oct 12 15:49:20 2016 New Revision: 307150 URL: https://svnweb.freebsd.org/changeset/base/307150 Log: Avoid using 'head' in generating groff doc date It may not be available in certain cross build cases. Note that this is a slight change in functionality, in that now only the first line of the source ChangeLog file is processed. This is acceptable as groff will be retired and we won't encounter a possibly-different ChangeLog format. Reported by: jhibbits Tested by: jhibbits Modified: head/gnu/usr.bin/groff/mdate.sh Modified: head/gnu/usr.bin/groff/mdate.sh ============================================================================== --- head/gnu/usr.bin/groff/mdate.sh Wed Oct 12 15:29:22 2016 (r307149) +++ head/gnu/usr.bin/groff/mdate.sh Wed Oct 12 15:49:20 2016 (r307150) @@ -4,6 +4,5 @@ set -e test -r "$1" export LC_ALL=C -changelog_date=$(sed -E -n 's/^([0-9]{4}-[0-9]{2}-[0-9]{2}).*$/\1/p' "$1" |\ - head -n 1) +changelog_date=$(sed -E -n '1s/^([0-9]{4}-[0-9]{2}-[0-9]{2}).*$/\1/p' "$1") echo $(date -j -f %Y-%m-%d +"%e %B %Y" $changelog_date)
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201610121549.u9CFnL2n054945>