IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 29163


Ignore:
Timestamp:
Sep 15, 2010, 1:58:11 PM (16 years ago)
Author:
bills
Message:

documented but forgot to implement --pretend option

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tools/rundiffskycell.pl

    r29159 r29163  
    2222use IO::File;
    2323
    24 my ($first, $last, $stage, $alt_workdir, $no_verbose);
     24my ($first, $last, $stage, $alt_workdir, $no_verbose, $pretend);
    2525
    2626my $dbname = "gpc1";
     
    3333    'redirect-output'   => \$redirect,
    3434    'update'            => \$update,
     35    'pretend'           => \$pretend,
    3536    'dbname=s'          => \$dbname,
    3637    'no-verbose'        => \$no_verbose,
     
    7980if ($update) {
    8081    my $revert_command = "difftool -revertdiffskyfile -diff_id $diff_id -skycell_id $skycell_id -dbname $dbname";
    81     my $rc = system $revert_command;
    82     if ($rc != 0) {
    83         my $status = $rc >> 8;
    84         print STDERR "$revert_command failed: $rc $status\n";
    85         exit $status;
     82    if ($pretend) {
     83        print "skipping $revert_command\n";
     84    } else {
     85        my $rc = system $revert_command;
     86        if ($rc != 0) {
     87            my $status = $rc >> 8;
     88            print STDERR "$revert_command failed: $rc $status\n";
     89            exit $status;
     90        }
    8691    }
    8792}
    8893
     94print "command to process this skycell\n";
     95print "$command\n";
     96
     97exit 0 if $pretend;
     98
    8999exit system $command;
    90 
    91100
    92101
Note: See TracChangeset for help on using the changeset viewer.