From 3ea41b68d9f4a7caa3985f271fc8395f0c71b4c8 Mon Sep 17 00:00:00 2001 From: imp Date: Thu, 23 May 2019 17:19:00 +0000 Subject: [PATCH] Convert freebsd-version to using -v newvers.sh has supported a variable setting only mode, use that in preference to grep to future proof this script from changes there. Differential Revision: https://reviews.freebsd.org/D19849 --- bin/freebsd-version/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/freebsd-version/Makefile b/bin/freebsd-version/Makefile index 073f4d3fa00c..7dcaf8a1eff0 100644 --- a/bin/freebsd-version/Makefile +++ b/bin/freebsd-version/Makefile @@ -7,7 +7,7 @@ CLEANFILES = freebsd-version freebsd-version.sh NEWVERS = ${SRCTOP}/sys/conf/newvers.sh freebsd-version.sh: ${.CURDIR}/freebsd-version.sh.in ${NEWVERS} - eval $$(egrep '^(TYPE|REVISION|BRANCH)=' ${NEWVERS}) ; \ + eval $$(sh ${NEWVERS} -v); \ if ! sed -e "\ s/@@TYPE@@/$${TYPE}/g; \ s/@@REVISION@@/$${REVISION}/g; \