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

Comparing COMP/SCRAM/src/Configuration/ConfigArea.pm (file contents):
Revision 1.6 by williamc, Thu Jan 27 17:50:55 2000 UTC vs.
Revision 1.7 by williamc, Wed Feb 9 08:16:15 2000 UTC

# Line 27 | Line 27
27   # copy(location)                : make a copy of the current area at the
28   #                                 specified location - return an object
29   #                                 representing the area
30 + # linkarea(oref)                : link area with another
31  
32   package Configuration::ConfigArea;
33   use ActiveDoc::ActiveDoc;
# Line 43 | Line 44 | sub init {
44          $self->newparse("download");
45          $self->newparse("setup");
46          $self->addtag("init","project",\&Project_Start,$self,
47 <        \&Project_text,$self,"", $self );
47 >            \&Project_text,$self,"", $self );
48          $self->addurltags("download");
49          $self->addtag("download","use",\&Use_download_Start,$self,
50                                                  "", $self, "",$self);
# Line 51 | Line 52 | sub init {
52          $self->addtag("setup","use",\&Use_Start,$self, "", $self, "",$self);
53   }
54  
55 +
56   sub defaultdirname {
57          my $self=shift;
58          my $name=$self->name();
# Line 64 | Line 66 | sub defaultdirname {
66   sub setup {
67          my $self=shift;
68  
69 <        # --- find out the location
70 <        my $location=$self->requestoption("area_location",
71 <                "Please Enter the location of the directory");
72 <        if ( $location!~/^\// ) {
69 >        # --- find out the location - default is cwd
70 >        my $location=$self->option("area_location");
71 >        if ( ! defined $location ) {
72 >                $location=cwd();
73 >        }
74 >        elsif ( $location!~/^\// ) {
75                  $location=cwd()."/".$location;
76          }
77  
# Line 148 | Line 152 | sub copy {
152  
153          AddDir::adddir(dirname($destination));
154          
155 <        my @cpcmd=(qw(cp -r), "$self->location()", "$destination");
156 <        print "@cpcmd";
155 >        $temp=$self->location();
156 >        my @cpcmd=(qw(cp -r), "$temp", "$destination");
157 >        print "@cpcmd"."\n";
158   #       File::Copy::copy("$self->location()", "$destination") or
159 <        system(@cpcmd) or
159 >        system(@cpcmd) == 0 or
160                          $self->error("Cannot copy ".$self->location().
161                          " to $destination ".$!);
162  
# Line 250 | Line 255 | sub addconfigitem {
255          # Set up the document
256          $docref->setup();
257   #       $self->config()->storepolicy("local");
253        $docref->save();
258   }
259  
260   # -------------- Tags ---------------------------------

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines