IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 27355 for trunk/pstamp/scripts


Ignore:
Timestamp:
Mar 19, 2010, 8:32:52 AM (16 years ago)
Author:
bills
Message:

put request files from the web interface into a subdirectory instead of the
workdir

File:
1 edited

Legend:

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

    r27172 r27355  
    2020use Getopt::Long qw( GetOptions );
    2121use Sys::Hostname;
     22use POSIX qw( strftime );
    2223
    2324my $host = hostname();
     
    8283my $cur_dir = getcwd();
    8384#print STDERR "cur_dir is $cur_dir\n";
     85
     86my $datestr = strftime "%Y%m%d", gmtime;
     87my $datedir = "$cur_dir/webreq/$datestr";
     88if (! -e $datedir ) {
     89    if (!  mkdir $datedir ) {
     90        print STDERR  "failed to create working directory $datedir";
     91        exit $PS_EXIT_CONFIG_ERROR;
     92    }
     93}
     94
    8495my $request_name = "web_" . get_webreq_num();
    85 my $request_file = "$cur_dir/$request_name.fits";
     96my $request_file = "$datedir/$request_name.fits";
    8697{
    8798    my $command = "$pstamprequest -req_name $request_name -project $project $request_file @ARGV";
Note: See TracChangeset for help on using the changeset viewer.