summaryrefslogtreecommitdiff
path: root/postprocess/signing/signing.pl
diff options
context:
space:
mode:
Diffstat (limited to 'postprocess/signing/signing.pl')
-rw-r--r--postprocess/signing/signing.pl27
1 files changed, 13 insertions, 14 deletions
diff --git a/postprocess/signing/signing.pl b/postprocess/signing/signing.pl
index b937f0e634bb..fc17092594d5 100644
--- a/postprocess/signing/signing.pl
+++ b/postprocess/signing/signing.pl
@@ -147,9 +147,9 @@ sub sign_files #09.07.2007 10:36
}
$signtool .= " -v" if ($opt_verbose);
$commandline_base = $signtool;
- $commandline_base .= " -f $opt_pfxfile" if ($opt_pfxfile != "");
- $commandline_base .= " -p $opt_pass" if ($opt_pass != "");
- $commandline_base .= " -t $opt_timestamp_url" if ($opt_timestamp_url != "");
+ $commandline_base .= " -f $opt_pfxfile" if ($opt_pfxfile ne "");
+ $commandline_base .= " -p $opt_pass" if ($opt_pass ne "");
+ $commandline_base .= " -t $opt_timestamp_url" if ($opt_timestamp_url ne "");
# Here switch between:
# one command line for muliple files (all doesn't work, too much) / for each file one command line
@@ -208,17 +208,16 @@ sub execute #11.07.2007 10:02
{
my $commandline = shift;
my $result = "";
-
- print "$commandline\n" if ($debug);
- open(PIPE, "$commandline 2>&1 |") || die "Error: Cant open pipe!\n";
- while ( $result = <PIPE> ) {
- print LOG "$result" if ($opt_log); # logging
- if ( $result =~ /SignTool Error\:/ ) {
- close PIPE;
- print_error( "$result\n" );
- } # if error
- } # while
- close PIPE;
+ my $errorlines = "";
+
+ print "$commandline\n" if ($debug);
+ open(PIPE, "$commandline 2>&1 |") || die "Error: Cannot execute '$commandline' - $!\n";
+ while ( $result = <PIPE> ) {
+ print LOG "$result" if ($opt_log);
+ $errorlines .= $result if ($result =~ /SignTool Error\:/);
+ } # while
+ close PIPE;
+ print_error( "$errorlines\n" ) if ($errorlines);
} ##execute
############################################################################