Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 23 May 2019 17:19:00 +0000 (UTC)
From:      Warner Losh <imp@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r348177 - head/bin/freebsd-version
Message-ID:  <201905231719.x4NHJ0UK026535@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: imp
Date: Thu May 23 17:19:00 2019
New Revision: 348177
URL: https://svnweb.freebsd.org/changeset/base/348177

Log:
  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

Modified:
  head/bin/freebsd-version/Makefile

Modified: head/bin/freebsd-version/Makefile
==============================================================================
--- head/bin/freebsd-version/Makefile	Thu May 23 17:18:56 2019	(r348176)
+++ head/bin/freebsd-version/Makefile	Thu May 23 17:19:00 2019	(r348177)
@@ -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; \



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201905231719.x4NHJ0UK026535>