Changeset 12966
- Timestamp:
- 2006-10-03T11:53:55+13:00 (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gsdl/perllib/scriptutil.pm
r10418 r12966 33 33 sub check_removeold_and_keepold { 34 34 35 my ($removeold, $keepold, $ dir, $collectcfg) = @_;35 my ($removeold, $keepold, $incremental, $dir, $collectcfg) = @_; 36 36 37 if ( $keepold && $removeold) {37 if (($keepold && $removeold) || ($incremental && $removeold) ) { 38 38 gsprintf(STDERR, "{scripts.both_old_options}\n", $dir); 39 39 sleep(3); #just in case … … 42 42 } 43 43 44 if (!$keepold && !$removeold ) {44 if (!$keepold && !$removeold && !$incremental) { 45 45 # we only look at config file options if we dont have these on the command line 46 46 if (defined $collectcfg->{'removeold'} && $collectcfg->{'removeold'} =~ /^true$/i ) { … … 48 48 } elsif (defined $collectcfg->{'keepold'} && $collectcfg->{'keepold'} =~ /^true$/i) { 49 49 $keepold = 1; 50 } elsif (defined $collectcfg->{'incremental'} && $collectcfg->{'incremental'} =~ /^true$/i) { 51 $incremental = 1; 50 52 } 51 53 } 52 if (!$keepold && !$removeold) { 54 55 if (!$keepold && !$removeold && !$incremental) { 53 56 gsprintf(STDERR, "{scripts.no_old_options} \n", $dir); 54 57 sleep(3); #just in case … … 56 59 } 57 60 58 return ($removeold, $keepold); 61 # incremental implies keepold 62 if ($incremental) { 63 $keepold = 1; 64 } 65 return ($removeold, $keepold, $incremental); 59 66 60 67 }
Note:
See TracChangeset
for help on using the changeset viewer.