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
7dcc4e75
Commit
7dcc4e75
authored
Sep 21, 2010
by
Tom Lane
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add_cvs_markers isn't useful anymore.
parent
538d685a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
49 deletions
+0
-49
src/tools/add_cvs_markers
src/tools/add_cvs_markers
+0
-49
No files found.
src/tools/add_cvs_markers
deleted
100755 → 0
View file @
538d685a
#!/bin/sh
# src/tools/add_cvs_markers
# Author: Andrew Dunstan
# Script to add PostgreSQL markers to source files that are lacking them.
# currently only works for .c and .h files
# Needs a sed that understands the -i switch.
# Really only tested on my Linux box.
# We try to avoid adding markers to third party files, or files that will
# cause regression problems (e.g. some ecpg headers).
# If the file begins with a comment, we put the marker in there,
# otherwise we add a new comment at the top of the file. This makes things
# a bit prettier.
# This script should be run at the top of the source tree.
# If we're in the tools directory, the script tries to take us to the
# right spot.
CWD
=
`
pwd
`
test
"
`
basename
$CWD
`
"
=
"tools"
&&
cd
../..
# need a dummy file in case we don't find any with missing markers,
# to suppress messages about sed not finding any input files
touch
dummy
# first process the files that already start with a comment:
find
.
\(
\(
-name
'libstemmer'
-o
-name
'expected'
-o
-name
'ppport.h'
\
-o
-name
'regression.h'
-o
-name
'sql3types.h'
-o
-name
'sqlca.h'
\)
\
-prune
\)
-o
\(
-name
'*.[ch]'
\)
\(
-exec
grep
-q
'\$PostgreSQL'
{}
\;
\
-o
-print
\)
|
\
{
while
read
file
;
do
head
-n
1 <
$file
|
grep
-q
'^/\*'
&&
echo
$file
done
;
echo
dummy
;
}
|
\
xargs
-l
sed
-i
-e
'1s/^\// /'
-e
'1i/*\n * \x24PostgreSQL:$ \n *'
# now all the rest (i.e. the files that don't start with a comment)
{
find
.
\(
\(
-name
'libstemmer'
-o
-name
'expected'
-o
-name
'ppport.h'
\
-o
-name
'regression.h'
-o
-name
'sql3types.h'
-o
-name
'sqlca.h'
\)
\
-prune
\)
-o
\(
-name
'*.[ch]'
\)
\(
-exec
grep
-q
'\$PostgreSQL'
{}
\;
\
-o
-print
\)
;
echo
dummy
;
}
|
\
xargs
-l
sed
-i
-e
'1i/*\n * \x24PostgreSQL:$ \n */'
rm
-f
dummy
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