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

Comparing COMP/SCRAM/src/Configuration/ConfigArea.pm (file contents):
Revision 1.23 by sashby, Fri Dec 10 13:41:40 2004 UTC vs.
Revision 1.26 by sashby, Wed Feb 2 18:57:01 2005 UTC

# Line 477 | Line 477 | sub align {
477  
478   sub copysetup {
479          my $self=shift;
480 <        my $dest=shift;
481 <
480 >        my $dest=shift;
481          my $rv=1;
482          # copy across the admin dir
483          my $temp=$self->location()."/".$self->{admindir}."/".$self->arch();
# Line 492 | Line 491 | sub copysetup {
491          return $rv;
492   }
493  
494 + sub copyurlcache {
495 +        my $self=shift;
496 +        my $dest=shift;
497 +        my $rv=1;
498 +        # copy across the admin dir
499 +        my $temp=$self->location()."/".$self->{admindir}."/cache";
500 +        my $temp2=$dest."/".$self->{admindir}."/cache";
501 +        if ( $temp ne $temp2 ) {
502 +         if ( -d $temp ) {
503 +          AddDir::copydir($temp,$temp2);
504 +          $rv=0;
505 +         }
506 +        }
507 +        return $rv;
508 + }
509 +
510 + sub copywithskip {
511 +        my $self=shift;
512 +        my $dest=shift;
513 +        my ($filetoskip)=@_;            
514 +        my $rv=1;
515 +        # copy across the admin dir
516 +        my $temp=$self->location()."/".$self->{admindir}."/".$self->arch();
517 +        my $temp2=$dest."/".$self->{admindir}."/".$self->arch();
518 +        if ( $temp ne $temp2 ) {
519 +         if ( -d $temp ) {
520 +          AddDir::copydirwithskip($temp,$temp2,$filetoskip);
521 +          $rv=0;
522 +         }
523 +        }
524 +        return $rv;
525 + }
526 +
527   sub copyenv {
528          my $self=shift;
529          my $hashref=shift;
# Line 545 | Line 577 | sub save {
577  
578   # ---- support routines
579  
580 < sub _SaveEnvFile {
581 <        my $self=shift;
582 <        use FileHandle;
583 <        my $fh=FileHandle->new();
584 <        open ( $fh, ">".$self->location()."/".$self->{admindir}."/".
585 <                "Environment" ) or
586 <                $self->error("Cannot Open Environment file to Save ("
587 <                                .$self->location().")\n $!");
580 > sub _SaveEnvFile
581 >   {
582 >   my $self=shift;
583 >   my $filemode = 0644;
584 >  
585 >   use FileHandle;
586 >   my $fh=FileHandle->new();
587 >   open ( $fh, ">".$self->location()."/".$self->{admindir}."/".
588 >          "Environment" ) or
589 >          $self->error("Cannot Open Environment file to Save ("
590 >                       .$self->location().")\n $!");
591          
592 <        print $fh "SCRAM_PROJECTNAME=".$self->name()."\n";
593 <        print $fh "SCRAM_PROJECTVERSION=".$self->version()."\n";
594 <        print $fh "SCRAM_CONFIGDIR=".$self->configurationdir()."\n";
595 <        print $fh "SCRAM_SOURCEDIR=".$self->sourcedir()."\n";
596 <        print $fh "SCRAM_ProjReqsDoc=".$self->{reqdoc}."\n";
597 <        print $fh "SCRAM_TOOLBOXVERSION=".$self->{toolboxversion}."\n";
598 <        if ( defined $self->linkarea() ) {
599 <          my $area=$self->linkarea()->location();
600 <          if ( $area ne "" ) {
601 <          print $fh "RELEASETOP=".$area."\n";
602 <          }
603 <        }
604 <        undef $fh;
605 < }
606 <
592 >   print $fh "SCRAM_PROJECTNAME=".$self->name()."\n";
593 >   print $fh "SCRAM_PROJECTVERSION=".$self->version()."\n";
594 >   print $fh "SCRAM_CONFIGDIR=".$self->configurationdir()."\n";
595 >   print $fh "SCRAM_SOURCEDIR=".$self->sourcedir()."\n";
596 >   print $fh "SCRAM_ProjReqsDoc=".$self->{reqdoc}."\n";
597 >   print $fh "SCRAM_TOOLBOXVERSION=".$self->{toolboxversion}."\n";
598 >
599 >   if ( defined $self->linkarea() )
600 >      {
601 >      my $area=$self->linkarea()->location();
602 >      if ( $area ne "" )
603 >         {
604 >         print $fh "RELEASETOP=".$area."\n";
605 >         }
606 >      }
607 >  
608 >   undef $fh;
609 >  
610 >   # Set the default permissions (-rw-r--r--):
611 >   chmod $filemode, $self->location()."/".$self->{admindir}."/Environment";
612 >   }
613  
614   sub _LoadEnvFile
615     {

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines