Skip to content
Snippets Groups Projects
Commit 2ac64dba authored by Andrew Dunstan's avatar Andrew Dunstan
Browse files

Prevent CVS from mangling script

parent 3f850cbd
No related branches found
No related tags found
No related merge requests found
#!/bin/sh #!/bin/sh
# $PostgreSQL: pgsql/src/tools/add_cvs_markers,v 1.1 2008/06/15 21:46:02 adunstan Exp $ # $PostgreSQL: pgsql/src/tools/add_cvs_markers,v 1.2 2008/06/15 21:58:55 adunstan Exp $
# Author: Andrew Dunstan # Author: Andrew Dunstan
...@@ -36,7 +36,7 @@ find . \( \( -name 'libstemmer' -o -name 'expected' -o -name 'ppport.h' \ ...@@ -36,7 +36,7 @@ find . \( \( -name 'libstemmer' -o -name 'expected' -o -name 'ppport.h' \
{ while read file ; do { while read file ; do
head -n 1 < $file | grep -q '^/\*' && echo $file head -n 1 < $file | grep -q '^/\*' && echo $file
done ; echo dummy ;} | \ done ; echo dummy ;} | \
xargs -l sed -i -e '1s/^\// /' -e '1i/*\n * $PostgreSQL: pgsql/src/tools/add_cvs_markers,v 1.1 2008/06/15 21:46:02 adunstan Exp $ \n *' 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) # now all the rest (i.e. the files that don't start with a comment)
...@@ -44,7 +44,7 @@ find . \( \( -name 'libstemmer' -o -name 'expected' -o -name 'ppport.h' \ ...@@ -44,7 +44,7 @@ find . \( \( -name 'libstemmer' -o -name 'expected' -o -name 'ppport.h' \
-o -name 'regression.h' -o -name 'sql3types.h' -o -name 'sqlca.h' \) \ -o -name 'regression.h' -o -name 'sql3types.h' -o -name 'sqlca.h' \) \
-prune \) -o \( -name '*.[ch]' \) \( -exec grep -q '\$PostgreSQL' {} \; \ -prune \) -o \( -name '*.[ch]' \) \( -exec grep -q '\$PostgreSQL' {} \; \
-o -print \) ; echo dummy ;} | \ -o -print \) ; echo dummy ;} | \
xargs -l sed -i -e '1i/*\n * $PostgreSQL: pgsql/src/tools/add_cvs_markers,v 1.1 2008/06/15 21:46:02 adunstan Exp $ \n */' xargs -l sed -i -e '1i/*\n * \x24PostgreSQL:$ \n */'
rm -f dummy rm -f dummy
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment