svn commit: r358661 - stable/12/sys/conf

Warner Losh imp at FreeBSD.org
Thu Mar 5 06:19:22 UTC 2020


Author: imp
Date: Thu Mar  5 06:19:21 2020
New Revision: 358661
URL: https://svnweb.freebsd.org/changeset/base/358661

Log:
  MFC:
  
  r346018 | imp | 2019-04-07 12:39:55 -0600 (Sun, 07 Apr 2019) | 6 lines
  
  Use default shell assignment rather more complicated if then
  construct.
  
  Discussed with: emaste@, allanjude@ (changes (or not) based on their feedback)
  Differential Revision: https://reviews.freebsd.org/D19797

Modified:
  stable/12/sys/conf/newvers.sh
Directory Properties:
  stable/12/   (props changed)

Modified: stable/12/sys/conf/newvers.sh
==============================================================================
--- stable/12/sys/conf/newvers.sh	Thu Mar  5 00:18:09 2020	(r358660)
+++ stable/12/sys/conf/newvers.sh	Thu Mar  5 06:19:21 2020	(r358661)
@@ -46,10 +46,7 @@
 
 TYPE="FreeBSD"
 REVISION="12.1"
-BRANCH="STABLE"
-if [ -n "${BRANCH_OVERRIDE}" ]; then
-	BRANCH=${BRANCH_OVERRIDE}
-fi
+BRANCH=${BRANCH_OVERRIDE:-STABLE}
 RELEASE="${REVISION}-${BRANCH}"
 VERSION="${TYPE} ${RELEASE}"
 
@@ -80,21 +77,16 @@ if [ -z "${SYSDIR}" ]; then
     SYSDIR=$(dirname $0)/..
 fi
 
-if [ -n "${PARAMFILE}" ]; then
-	RELDATE=$(awk '/__FreeBSD_version.*propagated to newvers/ {print $3}' \
-		${PARAMFILE})
-else
-	RELDATE=$(awk '/__FreeBSD_version.*propagated to newvers/ {print $3}' \
-		${SYSDIR}/sys/param.h)
-fi
+RELDATE=$(awk '/__FreeBSD_version.*propagated to newvers/ {print $3}' \
+	      ${PARAMFILE:-${SYSDIR}/sys/param.h})
 
-b=share/examples/etc/bsd-style-copyright
 if [ -r "${SYSDIR}/../COPYRIGHT" ]; then
 	year=$(sed -Ee '/^Copyright .* The FreeBSD Project/!d;s/^.*1992-([0-9]*) .*$/\1/g' ${SYSDIR}/../COPYRIGHT)
 else
 	year=$(date +%Y)
 fi
 # look for copyright template
+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
@@ -123,9 +115,7 @@ COPYRIGHT="$COPYRIGHT
 
 # VARS_ONLY means no files should be generated, this is just being
 # included.
-if [ -n "$VARS_ONLY" ]; then
-	return 0
-fi
+[ -n "$VARS_ONLY" ] && return 0
 
 LC_ALL=C; export LC_ALL
 if [ ! -r version ]


More information about the svn-src-all mailing list