|
From: <sv...@va...> - 2006-06-01 13:44:17
|
Author: njn Date: 2006-06-01 14:44:07 +0100 (Thu, 01 Jun 2006) New Revision: 5948 Log: Added a useful script. Added: trunk/auxprogs/change-copyright-year Added: trunk/auxprogs/change-copyright-year =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- trunk/auxprogs/change-copyright-year (rev 0) +++ trunk/auxprogs/change-copyright-year 2006-06-01 13:44:07 UTC (rev 594= 8) @@ -0,0 +1,25 @@ +#! /bin/sh +# +# Script updates the copyright year in every file in Valgrind that conta= ins +# a copyright notice. Assumes they're all in the same format: +# +# "Copyright (C) 200x-200y" +# +# To use: +# - change the years in the 'sed' command below appropriately. +# - Run it from the base directory of a Valgrind workspace. =20 +# - And check the results look ok by diff'ing against the repository. +# +# Note that it will spit out some warnings when it runs; ignore these. +# +# Nb: after 2009, the sed string may have to be changed slightly -- it +# currently assumes the first year is in the range 2000..2009. + +# The find command deliberately skips .svn/ subdirs -- we don't want to +# change them. +for i in `find . -name '*' -type f -not -path '*.svn\/*'` ; do + echo $i + sed "s/Copyright (C) 200\([0-9]\)-2004/Copyright (C) 200\1-2005/" < = $i > tmp.$$ + mv tmp.$$ $i +done + Property changes on: trunk/auxprogs/change-copyright-year ___________________________________________________________________ Name: svn:executable + * |