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

Comparing COMP/SCRAM/src/BootStrapProject.pm (file contents):
Revision 1.4 by williamc, Mon Mar 8 09:56:21 1999 UTC vs.
Revision 1.10.2.3 by williamc, Mon Aug 30 14:15:34 1999 UTC

# Line 39 | Line 39 | sub BootStrapProject($) {
39                  'file' => 'none',
40                  'file_starttag' => \&file_start
41          };
42 <         $filename=urlhandler::urlhandler($url);
42 >        $filename=urlhandler::urlhandler($url);
43          $switch=Switcher->new($BootHash, $filename);
44          $switch->parse();
45   }
46  
47 < sub Bootlocaltop($hashref) {
47 > sub Bootlocaltop {
48          my $hashref=shift;
49          use Cwd;
50          use Utilities::AddDir;
51  
52          $switch->checkparam($hashref, $name, "name");
53          $switch->checkparam($hashref, $name, "version");
54 <        $ENV{LOCALTOP}=&cwd."/".$$hashref{'name'}."_".$$hashref{'version'};
54 >        if ( ! defined $ENV{devareaname} ) {
55 >         my $vers=$$hashref{'version'};
56 >         $vers=~s/^$$hashref{'name'}_//;
57 >         $ENV{LOCALTOP}=&cwd."/".$$hashref{'name'}."_".$vers;
58 >        }
59 >        else {
60 >         $ENV{LOCALTOP}=&cwd."/".$ENV{devareaname};
61 >        }
62          $scramdir=$ENV{LOCALTOP}."/.SCRAM";
63          &AddDir::adddir($scramdir);
64          chdir $ENV{LOCALTOP};
# Line 64 | Line 71 | sub project_start {
71  
72          $hashref=$switch->SetupValueHash( \@vars );
73          Bootlocaltop($hashref);
74 +        print "Installing Project $$hashref{'name'} ".
75 +                "Version $$hashref{'version'}\n";
76          open ( ENVIRONMENT , ">$scramdir/Environment" ) || die "Unable to open ".
77                                  "Environment file : $!\n";
78          print ENVIRONMENT 'SCRAM_PROJECTNAME='.$$hashref{'name'}."\n";
# Line 96 | Line 105 | sub config_starttag {
105  
106          $hashref=$switch->SetupValueHash( \@vars );
107          $switch->checkparam($hashref, $name, "dir");
108 +        $$hashref{'dir'}=~s/`//g;
109          print ENVIRONMENT 'projconfigdir='.$$hashref{'dir'}."\n";
110          $ENV{SCRAM_BootStrapFiles}=$ENV{SCRAM_BootStrapFiles}.":".
111                  $ENV{LOCALTOP}."/".$$hashref{'dir'};
112          push @dirstack, $ENV{LOCALTOP}."/".$$hashref{'dir'};
113          $currentdir=$ENV{LOCALTOP}."/".$$hashref{'dir'};
114 +        if ( $switch->context('project') ) {
115 +         print INSTALLFILE "<$name dir=$$hashref{dir}>\n";
116 +        }
117   }
118   sub config_endtag {
119 +        my $name=shift;
120 +
121          pop @dirstack;
122          $currentdir=$dirstack[$#dirstack];
123 +        if ( $switch->context('project') ) {
124 +         print INSTALLFILE "</$name>\n";
125 +        }
126   }
127  
128   sub file_start {
# Line 133 | Line 151 | sub reqs_start {
151          use clientfile;
152          $ENV{SCRAM_ProjReqsDoc}=
153            $currentdir."/".$$hashref{'name'};
154 +        print ENVIRONMENT 'SCRAM_ProjReqsDoc='.$ENV{SCRAM_ProjReqsDoc}."\n";
155   #       &urlhandler::urlhandler(&geturlbase."/".$$hashref{'name'},
156   #               $scramdir."/".$$hashref{'name'}) ;
157          if ( $switch->context("project") ) {
# Line 203 | Line 222 | sub install_finish {
222          my $name=shift;
223          my @vars=@_;
224          my $hashref;
206        use Utilities::AddDir;
207        use File::Copy;
208
209        # copy across the files in the config directory
210        AddDir::adddir($ENV{LOCALTOP}/$ENV{projconfigdir});
211        copy "$ENV{RELEASETOP}/$ENV{projconfigdir}",
212                        "$ENV{LOCALTOP}/$ENV{projconfigdir}";
225   }
226  
227   sub cvsrep_start {

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines