IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Jul 17, 2014, 2:28:36 PM (12 years ago)
Author:
eugene
Message:

output directory has year/month/day subdirs

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/pstamp/scripts/pstamp_insert_request.pl

    r36594 r37079  
    119119}
    120120
    121 my $datestr = strftime "%Y%m%d", gmtime;
     121# put file in directory for the current date
     122my $datestr = strftime "%Y/%m/%d", gmtime;
    122123my $datedir = "$workdir/webreq/$datestr";
    123124if (! -e $datedir ) {
    124     if (!  mkdir $datedir ) {
    125         print STDERR  "failed to create working directory $datedir";
     125    my $rc = system "mkdir -p $datedir";
     126    if ($rc) {
     127        my $status = $rc >> 8;
     128        print STDERR  "failed to create working directory $datedir: $rc $status";
    126129        exit $PS_EXIT_CONFIG_ERROR;
    127130    }
    128131}
     132
    129133
    130134my $webreq_num = get_webreq_num();
Note: See TracChangeset for help on using the changeset viewer.