Attachment 'CVSHEAD.pl'
Download 1 #!/usr/bin/perl -w
2 #
3 # Check "CVS-FILES" for "^[whitespace]$Id:" and insert "$Revision", "$Log", "$Date"
4 # just after that.
5 #
6 # ra@br-online.de 2003-04-29
7 #
8 #
9
10 use File::Copy;
11
12 my $line = "";
13 my $filename = $ARGV[0];
14 my $tmpfilename = $filename.$$;
15 copy $filename => $tmpfilename or die "$!";
16
17 open (FILE,"< $tmpfilename");
18 open (OUTFILE,">$filename");
19
20 while (<FILE>) {
21 if ($_ =~ /\$Id:/) {
22 print OUTFILE "$_\n\t\$Date\$\n\t\$Revision\$\n\t\$Log\$\n"
23 } else {
24 print OUTFILE "$_"
25 }
26 }
27 close(FILE);
28 close(OUTFILE);
29 system("rm $tmpfilename");
30
31
Attached Files
To refer to attachments on a page, use attachment:filename, as shown below in the list of files. Do NOT use the URL of the [get] link, since this is subject to change and can break easily.You are not allowed to attach a file to this page.