newvers.sh: better regexp for the FreeBSD_version line

Tested with:		cirrus-ci https://cirrus-ci.com/build/6012323274948608
Reviewed by:		emaste@, rgrimes@
Sponsored by:		Netflix
Differential Revision:	https://reviews.freebsd.org/D29869
This commit is contained in:
Warner Losh 2021-04-22 10:43:43 -06:00
parent 2e5929a756
commit 2183bfcce4

View File

@ -65,7 +65,7 @@ if [ -z "${SYSDIR}" ]; then
SYSDIR=$(dirname $0)/..
fi
RELDATE=$(awk '/__FreeBSD_version.*propagated to newvers/ {print $3}' ${PARAMFILE:-${SYSDIR}/sys/param.h})
RELDATE=$(awk '/^\#define[[:space:]]*__FreeBSD_version/ {print $3}' ${PARAMFILE:-${SYSDIR}/sys/param.h})
if [ -r "${SYSDIR}/../COPYRIGHT" ]; then
year=$(sed -Ee '/^Copyright .* The FreeBSD Project/!d;s/^.*1992-([0-9]*) .*$/\1/g' ${SYSDIR}/../COPYRIGHT)