Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 22 Dec 2014 19:10:21 +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: r276075 - head/sys/conf
Message-ID:  <201412221910.sBMJALXP002825@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: imp
Date: Mon Dec 22 19:10:21 2014
New Revision: 276075
URL: https://svnweb.freebsd.org/changeset/base/276075

Log:
  Don't require ${SYSDIR}/../COPYRIGHT to exist. Fall back to the
  current date if we can't find it.
  
  MFC After: 2 weeks

Modified:
  head/sys/conf/newvers.sh

Modified: head/sys/conf/newvers.sh
==============================================================================
--- head/sys/conf/newvers.sh	Mon Dec 22 19:10:11 2014	(r276074)
+++ head/sys/conf/newvers.sh	Mon Dec 22 19:10:21 2014	(r276075)
@@ -52,7 +52,11 @@ else
 fi
 
 b=share/examples/etc/bsd-style-copyright
-year=$(sed -Ee '/^Copyright .* The FreeBSD Project/!d;s/^.*1992-([0-9]*) .*$/\1/g' ${SYSDIR}/../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
 for bsd_copyright in ../$b ../../$b ../../../$b /usr/src/$b /usr/$b
 do



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