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, |
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; |
54 |
|
$ENV{LOCALTOP}=&cwd."/".$$hashref{'name'}."_".$$hashref{'version'}; |
55 |
|
$scramdir=$ENV{LOCALTOP}."/.SCRAM"; |
56 |
|
&AddDir::adddir($scramdir); |
57 |
+ |
chdir $ENV{LOCALTOP}; |
58 |
|
} |
59 |
|
|
60 |
|
sub project_start { |
64 |
|
|
65 |
|
$hashref=$switch->SetupValueHash( \@vars ); |
66 |
|
Bootlocaltop($hashref); |
67 |
+ |
print "Installing Project $$hashref{'name'} ". |
68 |
+ |
"Version $$hashref{'version'}\n"; |
69 |
|
open ( ENVIRONMENT , ">$scramdir/Environment" ) || die "Unable to open ". |
70 |
|
"Environment file : $!\n"; |
71 |
|
print ENVIRONMENT 'SCRAM_PROJECTNAME='.$$hashref{'name'}."\n"; |
76 |
|
"version=$$hashref{version}>\n"; |
77 |
|
print INSTALLFILE "<base urltype=file value=$scramdir>\n"; |
78 |
|
print INSTALLFILE "<file name=Environment>\n"; |
79 |
+ |
push @{ $basehash{file}}, "$ENV{SCRAM_HOME}/toolbox"; |
80 |
+ |
$lastbasekey='file'; |
81 |
+ |
push @dirstack, $scramdir; |
82 |
+ |
$currentdir=$scramdir; |
83 |
|
} |
84 |
|
|
85 |
|
sub project_finish { |
101 |
|
print ENVIRONMENT 'projconfigdir='.$$hashref{'dir'}."\n"; |
102 |
|
$ENV{SCRAM_BootStrapFiles}=$ENV{SCRAM_BootStrapFiles}.":". |
103 |
|
$ENV{LOCALTOP}."/".$$hashref{'dir'}; |
104 |
+ |
push @dirstack, $ENV{LOCALTOP}."/".$$hashref{'dir'}; |
105 |
+ |
$currentdir=$ENV{LOCALTOP}."/".$$hashref{'dir'}; |
106 |
+ |
if ( $switch->context('project') ) { |
107 |
+ |
print INSTALLFILE "<$name dir=$$hashref{dir}>\n"; |
108 |
+ |
} |
109 |
+ |
} |
110 |
+ |
sub config_endtag { |
111 |
+ |
my $name=shift; |
112 |
+ |
|
113 |
+ |
pop @dirstack; |
114 |
+ |
$currentdir=$dirstack[$#dirstack]; |
115 |
+ |
if ( $switch->context('project') ) { |
116 |
+ |
print INSTALLFILE "</$name>\n"; |
117 |
+ |
} |
118 |
|
} |
119 |
|
|
120 |
|
sub file_start { |
142 |
|
$switch->checkparam($hashref, $name, "name"); |
143 |
|
use clientfile; |
144 |
|
$ENV{SCRAM_ProjReqsDoc}= |
145 |
< |
&urlhandler::urlhandler(&geturlbase."/".$$hashref{'name'}, |
146 |
< |
$scramdir."/".$$hashref{'name'}) ; |
145 |
> |
$currentdir."/".$$hashref{'name'}; |
146 |
> |
# &urlhandler::urlhandler(&geturlbase."/".$$hashref{'name'}, |
147 |
> |
# $scramdir."/".$$hashref{'name'}) ; |
148 |
|
if ( $switch->context("project") ) { |
149 |
|
print INSTALLFILE "<$name name=$$hashref{name}>\n"; |
150 |
|
} |
213 |
|
my $name=shift; |
214 |
|
my @vars=@_; |
215 |
|
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}"; |
216 |
|
} |
217 |
|
|
218 |
|
sub cvsrep_start { |