svn commit: r276075 - head/sys/conf

Warner Losh imp at FreeBSD.org
Mon Dec 22 19:10:22 UTC 2014


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


More information about the svn-src-head mailing list