From owner-svn-src-all@freebsd.org Mon Apr 8 18:25:15 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8BA9015645B1; Mon, 8 Apr 2019 18:25:15 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 2E50C85625; Mon, 8 Apr 2019 18:25:15 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 133A0272B0; Mon, 8 Apr 2019 18:25:15 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x38IPEBe054312; Mon, 8 Apr 2019 18:25:14 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x38IPEpV054311; Mon, 8 Apr 2019 18:25:14 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201904081825.x38IPEpV054311@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Mon, 8 Apr 2019 18:25:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r346039 - head/sys/conf X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: head/sys/conf X-SVN-Commit-Revision: 346039 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 2E50C85625 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.98 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.98)[-0.980,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 Apr 2019 18:25:15 -0000 Author: imp Date: Mon Apr 8 18:25:14 2019 New Revision: 346039 URL: https://svnweb.freebsd.org/changeset/base/346039 Log: Style only change: Prefer $() to `` $() is more modern and also nests. Convert the mix of styles to using only the former (although the latter was more common). It's the more dominant style in other shell scripts these days as well. Differential Revision: https://reviews.freebsd.org/D19840 Modified: head/sys/conf/newvers.sh Modified: head/sys/conf/newvers.sh ============================================================================== --- head/sys/conf/newvers.sh Mon Apr 8 18:16:49 2019 (r346038) +++ head/sys/conf/newvers.sh Mon Apr 8 18:25:14 2019 (r346039) @@ -120,12 +120,12 @@ b=share/examples/etc/bsd-style-copyright for bsd_copyright in ../$b ../../$b ../../../$b /usr/src/$b /usr/$b do if [ -r "$bsd_copyright" ]; then - COPYRIGHT=`sed \ + COPYRIGHT=$(sed \ -e "s/\[year\]/1992-$year/" \ -e 's/\[your name here\]\.* /The FreeBSD Project./' \ -e 's/\[your name\]\.*/The FreeBSD Project./' \ -e '/\[id for your version control system, if any\]/d' \ - $bsd_copyright` + $bsd_copyright) break fi done @@ -153,19 +153,19 @@ then fi touch version -v=`cat version` +v=$(cat version) u=${USER:-root} -d=`pwd` -h=${HOSTNAME:-`hostname`} +d=$(pwd) +h=${HOSTNAME:-$(hostname)} if [ -n "$SOURCE_DATE_EPOCH" ]; then - if ! t=`date -r $SOURCE_DATE_EPOCH 2>/dev/null`; then + if ! t=$(date -r $SOURCE_DATE_EPOCH 2>/dev/null); then echo "Invalid SOURCE_DATE_EPOCH" >&2 exit 1 fi else - t=`date` + t=$(date) fi -i=`${MAKE:-make} -V KERN_IDENT` +i=$(${MAKE:-make} -V KERN_IDENT) compiler_v=$($(${MAKE:-make} -V CC) -v 2>&1 | grep -w 'version') for dir in /usr/bin /usr/local/bin; do @@ -212,7 +212,7 @@ if findvcs .hg; then fi if [ -n "$svnversion" ] ; then - svn=`cd ${SYSDIR} && $svnversion 2>/dev/null` + svn=$(cd ${SYSDIR} && $svnversion 2>/dev/null) case "$svn" in [0-9]*[MSP]|*:*) svn=" r${svn}" @@ -228,8 +228,8 @@ if [ -n "$svnversion" ] ; then fi if [ -n "$git_cmd" ] ; then - git=`$git_cmd rev-parse --verify --short HEAD 2>/dev/null` - gitsvn=`$git_cmd svn find-rev $git 2>/dev/null` + git=$($git_cmd rev-parse --verify --short HEAD 2>/dev/null) + gitsvn=$($git_cmd svn find-rev $git 2>/dev/null) if [ -n "$gitsvn" ] ; then svn=" r${gitsvn}" git="=${git}" @@ -238,13 +238,13 @@ if [ -n "$git_cmd" ] ; then # We assume that if a tree is more than 10k commits out-of-sync # with FreeBSD, it has forked the the OS and the SVN rev no # longer matters. - gitsvn=`$git_cmd log -n 10000 | + gitsvn=$($git_cmd log -n 10000 | grep '^ git-svn-id:' | head -1 | \ - sed -n 's/^.*@\([0-9][0-9]*\).*$/\1/p'` + sed -n 's/^.*@\([0-9][0-9]*\).*$/\1/p') if [ -z "$gitsvn" ] ; then - gitsvn=`$git_cmd log -n 10000 --format='format:%N' | \ + gitsvn=$($git_cmd log -n 10000 --format='format:%N' | \ grep '^svn ' | head -1 | \ - sed -n 's/^.*revision=\([0-9][0-9]*\).*$/\1/p'` + sed -n 's/^.*revision=\([0-9][0-9]*\).*$/\1/p') fi if [ -n "$gitsvn" ] ; then svn=" r${gitsvn}" @@ -253,7 +253,7 @@ if [ -n "$git_cmd" ] ; then git=" ${git}" fi fi - git_b=`$git_cmd rev-parse --abbrev-ref HEAD` + git_b=$($git_cmd rev-parse --abbrev-ref HEAD) if [ -n "$git_b" ] ; then git="${git}(${git_b})" fi @@ -264,9 +264,9 @@ if [ -n "$git_cmd" ] ; then fi if [ -n "$hg_cmd" ] ; then - hg=`$hg_cmd id 2>/dev/null` - hgsvn=`$hg_cmd svn info 2>/dev/null | \ - awk -F': ' '/Revision/ { print $2 }'` + hg=$($hg_cmd id 2>/dev/null) + hgsvn=$($hg_cmd svn info 2>/dev/null | \ + awk -F': ' '/Revision/ { print $2 }') if [ -n "$hgsvn" ] ; then svn=" r${hgsvn}" fi