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.2.2 by williamc, Mon Aug 30 14:14:58 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 >         my $vers=$$hashref{'version'};
56 >         $vers=~s/^$$hashref{'name'}_//;
57 >        print $vers;
58 >         $ENV{LOCALTOP}=&cwd."/".$$hashref{'name'}."_".$vers;
59 >        }
60 >        else {
61 >         $ENV{LOCALTOP}=&cwd."/".$ENV{devareaname};
62 >        }
63          $scramdir=$ENV{LOCALTOP}."/.SCRAM";
64          &AddDir::adddir($scramdir);
65 +        chdir $ENV{LOCALTOP};
66   }
67  
68   sub project_start {
# Line 62 | Line 72 | sub project_start {
72  
73          $hashref=$switch->SetupValueHash( \@vars );
74          Bootlocaltop($hashref);
75 +        print "Installing Project $$hashref{'name'} ".
76 +                "Version $$hashref{'version'}\n";
77          open ( ENVIRONMENT , ">$scramdir/Environment" ) || die "Unable to open ".
78                                  "Environment file : $!\n";
79          print ENVIRONMENT 'SCRAM_PROJECTNAME='.$$hashref{'name'}."\n";
# Line 72 | Line 84 | sub project_start {
84                  "version=$$hashref{version}>\n";
85          print INSTALLFILE "<base urltype=file value=$scramdir>\n";
86          print INSTALLFILE "<file name=Environment>\n";
87 +        push @{ $basehash{file}}, "$ENV{SCRAM_HOME}/toolbox";
88 +        $lastbasekey='file';
89 +        push @dirstack, $scramdir;
90 +        $currentdir=$scramdir;
91   }
92  
93   sub project_finish {
# Line 90 | Line 106 | sub config_starttag {
106  
107          $hashref=$switch->SetupValueHash( \@vars );
108          $switch->checkparam($hashref, $name, "dir");
109 +        $$hashref{'dir'}=~s/`//g;
110          print ENVIRONMENT 'projconfigdir='.$$hashref{'dir'}."\n";
111          $ENV{SCRAM_BootStrapFiles}=$ENV{SCRAM_BootStrapFiles}.":".
112                  $ENV{LOCALTOP}."/".$$hashref{'dir'};
113 +        push @dirstack, $ENV{LOCALTOP}."/".$$hashref{'dir'};
114 +        $currentdir=$ENV{LOCALTOP}."/".$$hashref{'dir'};
115 +        if ( $switch->context('project') ) {
116 +         print INSTALLFILE "<$name dir=$$hashref{dir}>\n";
117 +        }
118 + }
119 + sub config_endtag {
120 +        my $name=shift;
121 +
122 +        pop @dirstack;
123 +        $currentdir=$dirstack[$#dirstack];
124 +        if ( $switch->context('project') ) {
125 +         print INSTALLFILE "</$name>\n";
126 +        }
127   }
128  
129   sub file_start {
# Line 120 | Line 151 | sub reqs_start {
151          $switch->checkparam($hashref, $name, "name");
152          use clientfile;
153          $ENV{SCRAM_ProjReqsDoc}=
154 <        &urlhandler::urlhandler(&geturlbase."/".$$hashref{'name'},
155 <                $scramdir."/".$$hashref{'name'}) ;
154 >          $currentdir."/".$$hashref{'name'};
155 >        print ENVIRONMENT 'SCRAM_ProjReqsDoc='.$ENV{SCRAM_ProjReqsDoc}."\n";
156 > #       &urlhandler::urlhandler(&geturlbase."/".$$hashref{'name'},
157 > #               $scramdir."/".$$hashref{'name'}) ;
158          if ( $switch->context("project") ) {
159           print INSTALLFILE "<$name name=$$hashref{name}>\n";
160          }
# Line 190 | Line 223 | sub install_finish {
223          my $name=shift;
224          my @vars=@_;
225          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}";
226   }
227  
228   sub cvsrep_start {

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines