Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
Postgres FD Implementation
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Abuhujair Javed
Postgres FD Implementation
Commits
ee639d27
Commit
ee639d27
authored
Aug 19, 2011
by
Bruce Momjian
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix copyright.pl to properly us 'tie' function.
Kris Jurka
parent
6dfcadaf
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
7 deletions
+6
-7
src/tools/backend/flow.gif
src/tools/backend/flow.gif
+0
-0
src/tools/copyright.pl
src/tools/copyright.pl
+6
-7
No files found.
src/tools/backend/flow.gif
View replaced file @
6dfcadaf
View file @
ee639d27
489 KB
|
W:
|
H:
489 KB
|
W:
|
H:
2-up
Swipe
Onion skin
src/tools/copyright.pl
View file @
ee639d27
...
@@ -11,6 +11,7 @@ use strict;
...
@@ -11,6 +11,7 @@ use strict;
use
warnings
;
use
warnings
;
use
File::
Find
;
use
File::
Find
;
use
Tie::
File
;
my
$pgdg
=
'
PostgreSQL Global Development Group
';
my
$pgdg
=
'
PostgreSQL Global Development Group
';
my
$cc
=
'
Copyright
\
(c
\
)
';
my
$cc
=
'
Copyright
\
(c
\
)
';
...
@@ -22,14 +23,12 @@ print "Using current year: $year\n";
...
@@ -22,14 +23,12 @@ print "Using current year: $year\n";
find
({
wanted
=>
\&
wanted
,
no_chdir
=>
1
},
'
.
');
find
({
wanted
=>
\&
wanted
,
no_chdir
=>
1
},
'
.
');
sub
wanted
{
sub
wanted
{
my
$filename
=
$
File::Find::
name
;
return
if
!
-
f
$
File::Find::
name
||
-
l
$
File::Find::
name
;
# only regular files
my
@lines
;
return
if
!
-
f
$file
name
;
tie
@lines
,
"
Tie::File
",
$
File::Find::
name
;
open
(
my
$FILE
,
'
<
',
$filename
)
or
die
"
Cannot open
$filename
";
foreach
my
$line
(
@lines
)
{
foreach
my
$line
(
<
$FILE
>
)
{
# We only care about lines with a copyright notice.
# We only care about lines with a copyright notice.
next
unless
$line
=~
m/$cc.*$pgdg/
;
next
unless
$line
=~
m/$cc.*$pgdg/
;
# We stop when we've done one substitution. This is both for
# We stop when we've done one substitution. This is both for
...
@@ -39,7 +38,7 @@ sub wanted {
...
@@ -39,7 +38,7 @@ sub wanted {
last
if
$line
=~
s/($cc\d{4})(, $pgdg)/$1-$year$2/
;
last
if
$line
=~
s/($cc\d{4})(, $pgdg)/$1-$year$2/
;
last
if
$line
=~
s/($cc\d{4})-\d{4}(, $pgdg)/$1-$year$2/
;
last
if
$line
=~
s/($cc\d{4})-\d{4}(, $pgdg)/$1-$year$2/
;
}
}
close
(
$FILE
)
or
die
"
Cannot close
$filename
"
;
untie
@lines
;
}
}
print
"
Manually update doc/src/sgml/legal.sgml and src/interfaces/libpq/libpq.rc.in too
\n
";
print
"
Manually update doc/src/sgml/legal.sgml and src/interfaces/libpq/libpq.rc.in too
\n
";
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment