From ffe8b623d99f1d5d6af3ba660ad6749ff96cc19c Mon Sep 17 00:00:00 2001
From: axis <qt-info@nokia.com>
Date: Tue, 23 Feb 2010 15:42:18 +0100
Subject: Made createpackage.pl return error when one of the tools fail.

Not strictly necessary for normal building, but nice to catch build
system bugs.
---
 bin/createpackage.pl | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/bin/createpackage.pl b/bin/createpackage.pl
index 3ab3909..3a61bc0 100755
--- a/bin/createpackage.pl
+++ b/bin/createpackage.pl
@@ -273,13 +273,15 @@ if($stub) {
     system ("makesis -s $pkgoutput $stub_sis_name");
 } else {
     # Create SIS.
-    system ("makesis $pkgoutput $unsigned_sis_name");
+    # The 'and' is because system uses 0 to indicate success.
+    system ("makesis $pkgoutput $unsigned_sis_name") and die ("makesis failed");
     print("\n");
 
     # Sign SIS with certificate info given as an argument.
     my $relcert = File::Spec->abs2rel($certificate);
     my $relkey = File::Spec->abs2rel($key);
-    system ("signsis $unsigned_sis_name $signed_sis_name $relcert $relkey $passphrase");
+    # The 'and' is because system uses 0 to indicate success.
+    system ("signsis $unsigned_sis_name $signed_sis_name $relcert $relkey $passphrase") and die ("signsis failed");
 
     # Check if creating signed SIS Succeeded
     stat($signed_sis_name);
-- 
cgit v0.12