- Timestamp:
- Dec 17, 2010, 10:05:43 AM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/eam_branches/ipp-20101205/ippScripts/scripts/dist_bundle.pl
r29063 r30102 62 62 my $streaksrelease = can_run('streaksrelease') or (warn "Can't find streaksrelease" and $missing_tools = 1); 63 63 my $bgtool = can_run('bgtool') or (warn "Can't find bgtool" and $missing_tools = 1); 64 my $file_cmd = can_run('file') or (warn "can't find program file" and $missing_tools = 1); 65 my $zcat = can_run('zcat') or (warn "can't find program zcat" and $missing_tools = 1); 64 66 if ($missing_tools) { 65 67 warn("Can't find required tools."); … … 526 528 $PS_EXIT_CONFIG_ERROR) if (!$resolved); 527 529 530 &my_die("config dump file resolved but not accessible: $config_file_rule", $component, 531 $PS_EXIT_CONFIG_ERROR) if !$ipprc->file_exists($resolved); 532 533 my $mdc_compressed; 534 { 535 my $command = "$file_cmd $resolved"; 536 my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) = 537 run(command => $command, verbose => $verbose); 538 unless ($success) { 539 $error_code = (($error_code >> 8) or $PS_EXIT_PROG_ERROR); 540 &my_die("Unable to perform $command: $error_code", $component, $error_code); 541 } 542 my $output = join "", @$stdout_buf; 543 # XXX: may need to to make this more robust 544 $mdc_compressed = ($output =~ /gzip/); 545 } 546 my $inName; 547 if ($mdc_compressed) { 548 my $tmpfile; 549 ($tmpfile, $inName) = tempfile( "/tmp/bundle.XXXX", UNLINK => !$save_temps ); 550 close($tmpfile) or &my_die("failed to close $inName", $component, $PS_EXIT_UNKNOWN_ERROR); 551 552 my $command = "$zcat $resolved > $inName"; 553 my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) = 554 run(command => $command, verbose => $verbose); 555 unless ($success) { 556 $error_code = (($error_code >> 8) or $PS_EXIT_PROG_ERROR); 557 &my_die("Unable to perform $command: $error_code", $component, $error_code); 558 } 559 560 561 } else { 562 $inName = $resolved; 563 } 564 my $in = open_with_retries($inName); 565 528 566 # we don't use the mdc parser because the perl parser is way is too slow for complicated config 529 567 # files like this 530 my $in = open_with_retries($resolved);531 532 568 my $line; 533 569 while ($line = <$in>) {
Note:
See TracChangeset
for help on using the changeset viewer.
