Provisioning: Fix DownloadURL utility's shasum check
authorSimo Fält <simo.falt@qt.io>
Tue, 5 Sep 2017 04:37:04 +0000 (07:37 +0300)
committerSimo Fält <simo.falt@qt.io>
Tue, 5 Sep 2017 11:36:43 +0000 (11:36 +0000)
MacOS 10.10 has older shasum tool, which does not support oneliner
verification.

Change-Id: If00b846d5772aa1991960675d022249d63e7bd77
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
coin/provisioning/common/DownloadURL.sh

index 305f267..a663b60 100644 (file)
@@ -70,7 +70,8 @@ function DownloadURL {
             esac
         }
         echo "Checking SHA1 on PKG '$targetFile'"
-        echo "$expectedSha1 *$targetFile" | shasum --check || throw $ExceptionSHA1
+        echo "$expectedSha1 *$targetFile" > $targetFile.sha1
+        /usr/bin/shasum --check $targetFile.sha1 || throw $ExceptionSHA1
     )
 
     catch || {