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.3 by williamc, Wed Mar 3 17:04:13 1999 UTC vs.
Revision 1.10 by williamc, Fri Apr 16 14:50:24 1999 UTC

# Line 23 | Line 23 | sub BootStrapProject($) {
23                  'cvs' => 'none',
24                  'cvs_EndTag' => 'none',
25                  'config_starttag' =>  \&config_starttag,
26 +                'config_endtag' =>  \&config_endtag,
27                  'config' => 'none',
28                  'base' => 'none',
29                  'base_starttag' => \&base_start,
# Line 38 | 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 >         $ENV{LOCALTOP}=&cwd."/".$$hashref{'name'}."_".$$hashref{'version'};
56 >        }
57 >        else {
58 >         $ENV{LOCALTOP}=&cwd."/".$ENV{devareaname};
59 >        }
60          $scramdir=$ENV{LOCALTOP}."/.SCRAM";
61          &AddDir::adddir($scramdir);
62 +        chdir $ENV{LOCALTOP};
63   }
64  
65   sub project_start {
# Line 62 | Line 69 | sub project_start {
69  
70          $hashref=$switch->SetupValueHash( \@vars );
71          Bootlocaltop($hashref);
72 +        print "Installing Project $$hashref{'name'} ".
73 +                "Version $$hashref{'version'}\n";
74          open ( ENVIRONMENT , ">$scramdir/Environment" ) || die "Unable to open ".
75                                  "Environment file : $!\n";
76          print ENVIRONMENT 'SCRAM_PROJECTNAME='.$$hashref{'name'}."\n";
# Line 72 | Line 81 | sub project_start {
81                  "version=$$hashref{version}>\n";
82          print INSTALLFILE "<base urltype=file value=$scramdir>\n";
83          print INSTALLFILE "<file name=Environment>\n";
84 +        push @{ $basehash{file}}, "$ENV{SCRAM_HOME}/toolbox";
85 +        $lastbasekey='file';
86 +        push @dirstack, $scramdir;
87 +        $currentdir=$scramdir;
88   }
89  
90   sub project_finish {
# Line 93 | Line 106 | sub config_starttag {
106          print ENVIRONMENT 'projconfigdir='.$$hashref{'dir'}."\n";
107          $ENV{SCRAM_BootStrapFiles}=$ENV{SCRAM_BootStrapFiles}.":".
108                  $ENV{LOCALTOP}."/".$$hashref{'dir'};
109 +        push @dirstack, $ENV{LOCALTOP}."/".$$hashref{'dir'};
110 +        $currentdir=$ENV{LOCALTOP}."/".$$hashref{'dir'};
111 +        if ( $switch->context('project') ) {
112 +         print INSTALLFILE "<$name dir=$$hashref{dir}>\n";
113 +        }
114 + }
115 + sub config_endtag {
116 +        my $name=shift;
117 +
118 +        pop @dirstack;
119 +        $currentdir=$dirstack[$#dirstack];
120 +        if ( $switch->context('project') ) {
121 +         print INSTALLFILE "</$name>\n";
122 +        }
123   }
124  
125   sub file_start {
# Line 120 | Line 147 | sub reqs_start {
147          $switch->checkparam($hashref, $name, "name");
148          use clientfile;
149          $ENV{SCRAM_ProjReqsDoc}=
150 <        &urlhandler::urlhandler(&geturlbase."/".$$hashref{'name'},
151 <                $scramdir."/".$$hashref{'name'}) ;
150 >          $currentdir."/".$$hashref{'name'};
151 >        print ENVIRONMENT 'SCRAM_ProjReqsDoc='.$ENV{SCRAM_ProjReqsDoc}."\n";
152 > #       &urlhandler::urlhandler(&geturlbase."/".$$hashref{'name'},
153 > #               $scramdir."/".$$hashref{'name'}) ;
154          if ( $switch->context("project") ) {
155           print INSTALLFILE "<$name name=$$hashref{name}>\n";
156          }
# Line 190 | Line 219 | sub install_finish {
219          my $name=shift;
220          my @vars=@_;
221          my $hashref;
193        use Utilities::AddDir;
194        use File::Copy;
195
196        # copy across the files in the config directory
197        AddDir::adddir($ENV{LOCALTOP}/$ENV{projconfigdir});
198        copy "$ENV{RELEASETOP}/$ENV{projconfigdir}",
199                        "$ENV{LOCALTOP}/$ENV{projconfigdir}";
222   }
223  
224   sub cvsrep_start {

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines