[Bio] / FigKernelPackages / Subsystem.pm Repository:
ViewVC logotype

Diff of /FigKernelPackages/Subsystem.pm

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.18, Wed Jun 23 21:32:24 2004 UTC revision 1.19, Thu Jun 24 18:41:39 2004 UTC
# Line 174  Line 174 
174      return $self;      return $self;
175  }  }
176    
177    sub new_from_dir
178    {
179        my($class, $dir, $fig) = @_;
180    
181        my $ssa_dir = $dir;
182        my $name;
183    
184        #
185        # For loading, the subsystem directory must already exist.
186        #
187    
188        my $self = {
189            dir => $ssa_dir,
190            name => $name,
191            fig => $fig,
192        };
193    
194        bless($self, $class);
195    
196        $self->load();
197    
198        return $self;
199    }
200    
201  sub create_subsystem  sub create_subsystem
202  {  {
203      my($class, $name, $fig) = @_;      my($class, $name, $fig) = @_;
# Line 901  Line 925 
925      print STDERR "Return status is $?\n";      print STDERR "Return status is $?\n";
926      print $log "Return status is $?\n";      print $log "Return status is $?\n";
927    
928    
929      #      #
930      # At this point, the extension is finished.      # At this point, the extension is finished.
931      # Back up the spreadsheet, and append the rows file to it.      # Make sure we have a rows file after the run.
932      #      #
933    
934      my $ssaD = $self->{dir};      my $ssaD = $self->{dir};
935    
936        my $rows_file = "$ssaD/rows";
937        if (! -f $rows_file)
938        {
939            print STDERR "Missing rows file: $ssaD/rows\n";
940            print $log "Missing rows file: $ssaD/rows\n";
941            return;
942        }
943    
944        #
945        # Back up the spreadsheet, and append the rows file to it.
946        #
947    
948      &FIG::verify_dir("$ssaD/Backup");      &FIG::verify_dir("$ssaD/Backup");
949      my $ts = time;      my $ts = time;
950      rename("$ssaD/spreadsheet~","$ssaD/Backup/spreadsheet.$ts");      rename("$ssaD/spreadsheet~","$ssaD/Backup/spreadsheet.$ts");

Legend:
Removed from v.1.18  
changed lines
  Added in v.1.19

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3