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

Comparing COMP/SCRAM/src/BuildSystem/ToolManager.pm (file contents):
Revision 1.2 by sashby, Fri Dec 10 13:41:37 2004 UTC vs.
Revision 1.4 by sashby, Wed Feb 2 18:57:01 2005 UTC

# Line 69 | Line 69 | sub clone()
69     {
70     my $self=shift;
71     my $projectarea=shift;
72 <  
72 >
73     # Change cache settings to reflect the new location:
74     $self->{topdir}=$projectarea->location();
75  
# Line 238 | Line 238 | sub toolsetup()
238     my ($arealocation, $toolname, $toolversion, $toolurl) = @_;
239     my ($urlcache, $url, $filename, $tfname);
240     my $toolfile;
241 <  
241 >
242     $toolname =~ tr[A-Z][a-z];
243     $toolversion ||= $self->defaultversion($toolname);
244     $urlcache=URL::URLcache->new($arealocation."/.SCRAM/cache"); # Download tool cache
245 <  
245 >
246     # Check for the downloaded tools cache:
247     if (defined($urlcache))
248        {
# Line 252 | Line 252 | sub toolsetup()
252     $url = $self->toolurls()->{$toolname};
253     $filename = $self->{toolfiledir}."/".$toolname;
254    
255 +   # If .SCRAM/InstalledTools doesn't exist, create it:
256 +   if (! -d $self->{toolfiledir})
257 +      {
258 +      AddDir::adddir($self->{toolfiledir});
259 +      }
260 +  
261     # First, check to see if there was a tool URL given. If so, we might need to read
262     # from http or from a file: type URL:
263     if (my ($proto, $urlv) = ($toolurl =~ /(.*):(.*)/))
# Line 317 | Line 323 | sub toolsetup()
323           # Get file from download cache:
324           ($url,$filename)=$self->{urlhandler}->get($url);
325           use File::Copy;
326 <         $tfname=$self->{toolfiledir}."/".$toolname;
326 >         $tfname=$self->{toolfiledir}."/".$toolname;    
327           copy($filename, $tfname);
328           $toolfile=$tfname;
329           }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines