IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Nov 2, 2011, 2:46:41 PM (15 years ago)
Author:
watersc1
Message:

Add date options as needed. Handle non-nebulous space in a way that allows it to be accounted better.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tools/diskspace/merge_counts_and_sizes.pl

    r32265 r32602  
    55use PS::IPP::Config;
    66
    7 getopts('N',\%opt);
     7getopts('ND:',\%opt);
    88
    99my $ipprc = PS::IPP::Config->new("GPC1");
    1010my $nebcon = $ipprc->nebulous();
    1111
    12 my @lt = gmtime;
    13 my $dt = DateTime->now;
    14 $dt->subtract( days => $lt[6] );
    15 my $datestring = $dt->ymd;
     12
     13my $datestring;
     14if (exists($opt{D})) {
     15    $datestring = $opt{D};
     16}
     17else {
     18    my @lt = gmtime;
     19    my $dt = DateTime->now;
     20    $dt->subtract( days => $lt[6] );
     21    $datestring = $dt->ymd;
     22}
    1623
    1724my $summary_file = "neb:///ipp_diskspace/${datestring}/summary.dat";
     
    94101
    95102if (exists($opt{N})) {
    96     my $dt = DateTime->now;
     103#     my $dt = DateTime->now;
    97104
    98     my @lt = gmtime;
    99     my $dt_data = DateTime->now;
    100     $dt->subtract( days => $lt[6]);
    101     my $datestring = $dt->ymd;
     105#     my @lt = gmtime;
     106#     my $dt_data = DateTime->now;
     107#     $dt->subtract( days => $lt[6]);
     108#     my $datestring = $dt->ymd;
     109
    102110    my $ipprc = PS::IPP::Config->new("GPC1");
    103111    my $nebcon = $ipprc->nebulous();
     
    123131        if ($stage eq 'RAW') {
    124132            $label = "PERMANENT";
     133        }
     134        elsif ($stage eq 'EXTERNAL') {
     135            $label = 'EXTERNAL';
    125136        }
    126137        else {
Note: See TracChangeset for help on using the changeset viewer.