Date: Thu, 23 May 2019 17:18:56 +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: r348176 - head/usr.sbin/amd/include Message-ID: <201905231718.x4NHIuQF026477@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: imp Date: Thu May 23 17:18:56 2019 New Revision: 348176 URL: https://svnweb.freebsd.org/changeset/base/348176 Log: Convert amd newvers to using newvers.sh -v. Rather than the tedious and error-prone grep of sys/conf/newvers.sh, use the new -v arg to dig out the data that's desired. Differential Revision: https://reviews.freebsd.org/D19849 Modified: head/usr.sbin/amd/include/newvers.sh Modified: head/usr.sbin/amd/include/newvers.sh ============================================================================== --- head/usr.sbin/amd/include/newvers.sh Thu May 23 17:18:48 2019 (r348175) +++ head/usr.sbin/amd/include/newvers.sh Thu May 23 17:18:56 2019 (r348176) @@ -5,7 +5,7 @@ # if [ -e $1 ]; then - eval `LC_ALL=C egrep '^[A-Z]+=' $1 | grep -v COPYRIGHT` + eval $(sh $1 -v) OS=`echo ${TYPE} | LC_ALL=C tr 'A-Z' 'a-z'` echo '/* Define name and version of host machine (eg. solaris2.5.1) */' echo "#define HOST_OS \"${OS}${REVISION}\""
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201905231718.x4NHIuQF026477>