From 65deb13436af7633e67886735d85020233e82442 Mon Sep 17 00:00:00 2001
From: Bruce Momjian <bruce@momjian.us>
Date: Thu, 1 Jan 2009 18:31:55 +0000
Subject: [PATCH] Be smarter --- accept missing comma, and force comma if
 missing.

---
 src/tools/copyright | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/tools/copyright b/src/tools/copyright
index 3fb18efc25b..de1fff2e22d 100755
--- a/src/tools/copyright
+++ b/src/tools/copyright
@@ -1,14 +1,14 @@
 #!/bin/sh
 
-# $PostgreSQL: pgsql/src/tools/copyright,v 1.17 2009/01/01 18:23:10 momjian Exp $
+# $PostgreSQL: pgsql/src/tools/copyright,v 1.18 2009/01/01 18:31:55 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
+	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
+	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 and src/interfaces/libpq/libpq.rc.in too" 1>&2
-- 
GitLab