Changeset 12966


Ignore:
Timestamp:
2006-10-03T11:53:55+13:00 (18 years ago)
Author:
kjdon
Message:

check_removeold_and_keepold now checks incremental as well

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/gsdl/perllib/scriptutil.pm

    r10418 r12966  
    3333sub check_removeold_and_keepold {
    3434
    35     my ($removeold, $keepold, $dir, $collectcfg) = @_;
     35    my ($removeold, $keepold, $incremental, $dir, $collectcfg) = @_;
    3636
    37     if ($keepold && $removeold) {
     37    if (($keepold && $removeold) || ($incremental && $removeold) ) {
    3838    gsprintf(STDERR, "{scripts.both_old_options}\n", $dir);
    3939    sleep(3); #just in case
     
    4242    }
    4343
    44     if (!$keepold && !$removeold) {
     44    if (!$keepold && !$removeold && !$incremental) {
    4545    # we only look at config file options if we dont have these on the command line
    4646    if (defined $collectcfg->{'removeold'} && $collectcfg->{'removeold'} =~ /^true$/i ) {
     
    4848    } elsif (defined $collectcfg->{'keepold'} && $collectcfg->{'keepold'} =~ /^true$/i) {
    4949        $keepold = 1;
     50    } elsif (defined $collectcfg->{'incremental'} && $collectcfg->{'incremental'} =~ /^true$/i) {
     51        $incremental = 1;
    5052    }
    5153    }
    52     if (!$keepold && !$removeold) {
     54
     55    if (!$keepold && !$removeold && !$incremental) {
    5356    gsprintf(STDERR, "{scripts.no_old_options} \n", $dir);
    5457    sleep(3); #just in case
     
    5659    }
    5760   
    58     return ($removeold, $keepold);
     61    # incremental implies keepold
     62    if ($incremental) {
     63    $keepold = 1;
     64    }
     65    return ($removeold, $keepold, $incremental);
    5966
    6067}
Note: See TracChangeset for help on using the changeset viewer.