]> granicus.if.org Git - postgresql/commitdiff
Modify copyright script to handle cases where there is only one year
authorBruce Momjian <bruce@momjian.us>
Wed, 2 Jan 2008 02:36:18 +0000 (02:36 +0000)
committerBruce Momjian <bruce@momjian.us>
Wed, 2 Jan 2008 02:36:18 +0000 (02:36 +0000)
in the copyright

src/tools/copyright

index de463d101e89f27fbac8cf6f230c60dc30dc6739..1c1ca305aa75da6dff8f7acc53f149b0c9842e49 100755 (executable)
@@ -1,12 +1,14 @@
 #!/bin/sh
 
-# $PostgreSQL: pgsql/src/tools/copyright,v 1.14 2007/01/10 02:41:28 momjian Exp $
+# $PostgreSQL: pgsql/src/tools/copyright,v 1.15 2008/01/02 02:36:18 momjian Exp $
 
 echo "Using current year:  `date '+%Y'`"
 
 rgrep -l 'Copyright.*PostgreSQL Global Development Group' | while read FILE
 do
        pipe sed 's/^\(.*Copyright (c) [12][0-9][0-9][0-9]\) \?- \?[12][0-9][0-9][0-9]\(, PostgreSQL Global Development Group.*\)$/\1-'`date '+%Y'`'\2/' $FILE
+       # handle cases where only one year appears
+       pipe sed 's/^\(.*Copyright (c) [12][0-9][0-9][0-9]\) \?\(, PostgreSQL Global Development Group.*\)$/\1-'`date '+%Y'`'\2/' $FILE
 done
 
 echo "Manually update doc/src/sgml/legal.sgml too" 1>&2