Commit be6c3b5c authored by Bruce Momjian's avatar Bruce Momjian

Modify copyright script to handle cases where there is only one year

in the copyright
parent 1af45f1d
#!/bin/sh #!/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'`" echo "Using current year: `date '+%Y'`"
rgrep -l 'Copyright.*PostgreSQL Global Development Group' | while read FILE rgrep -l 'Copyright.*PostgreSQL Global Development Group' | while read FILE
do 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 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 done
echo "Manually update doc/src/sgml/legal.sgml too" 1>&2 echo "Manually update doc/src/sgml/legal.sgml too" 1>&2
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment