summaryrefslogtreecommitdiff
path: root/ACE/bin/zap_svn_id.pl
blob: 04a9558ae778c5125ae562671f9c365987f74c03 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
eval '(exit $?0)' && eval 'exec perl -pi -S $0 ${1+"$@"}'
    & eval 'exec perl -0 -S $0 $argv:q'
    if 0;

# $Id$
#
# You may want to run the "find" command with this script, which maybe
# something like this:
#
# find . -type f \( -name "*.inl" -o -name "*.h" -o -name "*.cpp" -o -name "*.mpc" -o -name "*.idl" -o -name "*.conf" \) -print | xargs $ACE_ROOT/bin/zap_svn_id.pl

# The first three lines above let this script run without specifying the
# full path to perl, as long as it is in the user's PATH.
# Taken from perlrun man page.

#undef $/; $s = <>; $s =~ s/ \*\n \* \$Id\$\n \*\n/ \*\n/m; print $s
# Replace a three line doxygen style Id tag with just line *
BEGIN{undef $/;} s/ \*\n \* \$Id\$\n \*\n/ \*\n/smg;
# Replace a three line c-style id tag with an empty line below that with nothing
BEGIN{undef $/;} s/\/\/\n\/\/ \$Id\$\n\/\/\n\n//smg;
# Replace a three line c-style id tag with nothing
BEGIN{undef $/;} s/\/\/\n\/\/ \$Id\$\n\/\/\n//smg;
# Replace a two line c-style id tag with an empty line below that with nothing
BEGIN{undef $/;} s/\/\/\n\/\/ \$Id\$\n\n//smg;
# Replace a two line c-style id tag with nothing
BEGIN{undef $/;} s/\/\/\n\/\/ \$Id\$\n//smg;