From 74cf4301b5a71bf5c1e2e09110939cfff815b257 Mon Sep 17 00:00:00 2001 From: emaste Date: Wed, 12 Oct 2016 15:49:20 +0000 Subject: [PATCH] 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 --- gnu/usr.bin/groff/mdate.sh | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/gnu/usr.bin/groff/mdate.sh b/gnu/usr.bin/groff/mdate.sh index 70a052abc046..03a4a090685e 100755 --- a/gnu/usr.bin/groff/mdate.sh +++ b/gnu/usr.bin/groff/mdate.sh @@ -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)