Changeset 30489 for trunk/ippScripts/scripts/dist_defineruns.pl
- Timestamp:
- Feb 3, 2011, 2:51:02 PM (15 years ago)
- File:
-
- 1 edited
-
trunk/ippScripts/scripts/dist_defineruns.pl (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ippScripts/scripts/dist_defineruns.pl
r29068 r30489 42 42 43 43 # Parse the command-line arguments 44 my ($stage, $stage_limit, $dist_root, $ no_magic);44 my ($stage, $stage_limit, $dist_root, $workdir, $no_magic); 45 45 my ($dbname, $save_temps, $verbose, $no_update, $logfile); 46 46 my @labels; … … 49 49 'stage=s' => \$stage, # stage to queue 50 50 'label=s' => \@labels, # labels 51 'workdir=s' => \$workdir, # workdir 51 52 'stage_limit=s' => \$stage_limit,# maximum number of runs queued for each stage 52 'dist_root=s' => \$dist_root, # root of distribution work area53 # 'dist_root=s' => \$dist_root, # root of distribution work area 53 54 'no_magic' => \$no_magic, # queue runs without requiring magic (for testing only) 54 55 'dbname=s' => \$dbname, # Database name … … 66 67 $ipprc->redirect_output($logfile) if $logfile; 67 68 68 if (!$dist_root) { 69 $dist_root = metadataLookupStr($ipprc->{_siteConfig}, "DISTRIBUTION_ROOT"); 70 &my_die("failed to find DISTRIBUTION_ROOT in site configuration", $PS_EXIT_CONFIG_ERROR) if !$dist_root; 69 if (!$workdir) { 70 print "workdir not supplied will use DISTRIBUTION_ROOT\n"; 71 # old method where we set workdir based on a config file 72 if (!$dist_root) { 73 $dist_root = metadataLookupStr($ipprc->{_siteConfig}, "DISTRIBUTION_ROOT"); 74 &my_die("failed to find DISTRIBUTION_ROOT in site configuration", $PS_EXIT_CONFIG_ERROR) if !$dist_root; 75 } 76 77 my ($day, $month, $year) = (gmtime)[3,4,5]; 78 my $datestr = sprintf "%04d%02d%02d", $year+1900, $month + 1, $day; 79 80 $workdir = $dist_root . "/$datestr"; 81 82 print "workdir is $workdir\n"; 71 83 } 72 73 my ($day, $month, $year) = (gmtime)[3,4,5];74 my $datestr = sprintf "%04d%02d%02d", $year+1900, $month + 1, $day;75 76 my $workdir = "$dist_root/$datestr";77 78 print "workdir is $workdir\n";79 84 80 85 # if stage is not supplied as an argument, loop over all stages … … 90 95 my $command = "$disttool -definebyquery -stage $stage -workdir $workdir -label $label"; 91 96 $command .= " -no_magic" if $no_magic; 92 $command .= " - dry_run" if $no_update;97 $command .= " -pretend" if $no_update; 93 98 $command .= " -limit $stage_limit" if $stage_limit; 94 99 $command .= " -set_label $label";
Note:
See TracChangeset
for help on using the changeset viewer.
