[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.67, Wed Aug 10 12:03:36 2005 UTC revision 1.68, Wed Aug 10 16:25:28 2005 UTC
# Line 1025  Line 1025 
1025    
1026  sub write_subsystem  sub write_subsystem
1027  {  {
1028      my($self) = @_;      my($self, $force_backup) = @_;
1029    
1030      my $dir = $self->{dir};      my $dir = $self->{dir};
1031      my $fig = $self->{fig};      my $fig = $self->{fig};
# Line 1106  Line 1106 
1106          # version number should be bumped, so write the version file afterward.          # version number should be bumped, so write the version file afterward.
1107          #          #
1108    
1109          $self->update_backups();          $self->update_backups($force_backup);
1110    
1111          if ($self->{version} < 100) { $self->{version} += 100 }          if ($self->{version} < 100) { $self->{version} += 100 }
1112          open($fh, ">$dir/VERSION") or die "Cannot write $dir/VERSION: $!\n";          open($fh, ">$dir/VERSION") or die "Cannot write $dir/VERSION: $!\n";
# Line 1147  Line 1147 
1147    
1148  sub update_backups  sub update_backups
1149  {  {
1150      my($self) = @_;      my($self, $force_backup) = @_;
1151    
1152      my $dir = $self->{dir};      my $dir = $self->{dir};
1153      my $fig = $self->{fig};      my $fig = $self->{fig};
# Line 1161  Line 1161 
1161    
1162      my $ss_diff = abs((-s $ss_file) - (-s $ss_bak));      my $ss_diff = abs((-s $ss_file) - (-s $ss_bak));
1163      my $notes_diff = abs((-s $notes_file) - (-s $notes_bak));      my $notes_diff = abs((-s $notes_file) - (-s $notes_bak));
1164      my $reactions_diff = (system("cmp -s $reactions_file $reactions_bak") != 0);      my $reactions_diff = (system("cmp",  "-s",  $reactions_file, $reactions_bak) != 0);
1165  #   print STDERR "reactions_file=$reactions_file reactions_bak=$reactions_bak dif=$reactions_diff\n";  #   print STDERR "reactions_file=$reactions_file reactions_bak=$reactions_bak dif=$reactions_diff\n";
1166    
1167      if (($ss_diff > 10) or ($notes_diff > 10) or $reactions_diff)      if ($force_backup or ($ss_diff > 10) or ($notes_diff > 10) or $reactions_diff)
1168      {      {
1169          $self->make_backup();          $self->make_backup();
1170      }      }

Legend:
Removed from v.1.67  
changed lines
  Added in v.1.68

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3