ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/COMP/SCRAM/src/Utilities/SCRAMUtils.pm
(Generate patch)

Comparing COMP/SCRAM/src/Utilities/SCRAMUtils.pm (file contents):
Revision 1.2 by williamc, Mon Mar 1 11:01:36 1999 UTC vs.
Revision 1.7 by williamc, Mon Jul 31 14:04:17 2000 UTC

# Line 9 | Line 9 | require Exporter;
9   @EXPORT = qw(checkfile updatelookup);
10   use Carp;
11  
12 < sub checkfile ($filename) {
12 > sub checkfile {
13          my $filename=shift;
14          my $thisfile="";
15 <        $thifile=$ENV{LOCALTOP}."/".$filename;
15 >        $thisfile=$ENV{LOCALTOP}."/".$filename;
16          return $thisfile, if ( -e $thisfile );
17 <        $thifile=$ENV{RELEASETOP}."/".$filename;
17 >        $thisfile=$ENV{RELEASETOP}."/".$filename;
18          return $thisfile, if ( -e $thisfile );
19          return "";
20   }
# Line 32 | Line 32 | sub updatelookup {
32          open ( SCRAMWORK, ">$filename.wk" ) or
33                  croak "Unable to open $filename.wk ".$!."\n";
34          open ( SCRAMUPDATEFILE,  $filename );
35 +        print "Searching for ".$key."\n";
36          while ( <SCRAMUPDATEFILE> ) {
37 <                if ( $_=~/^\Q$key\E/o ) {
37 >                chomp;
38 >                if ( $_=~/^\Q$key\E/ ) {
39                          $update=1;
40                          print SCRAMWORK $key.$rest."\n";
41                  }
42 <                print SCRAMWORK $_;
42 >                else {  
43 >                 print SCRAMWORK $_."\n";
44 >                }
45          }
42
46          close SCRAMUPDATEFILE;
47          if ( $update==0 ) {
48                  print SCRAMWORK $key.$rest."\n";

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines