mirror of
git://code.qt.io/qt/qt5.git
synced 2026-05-02 09:27:54 +08:00
Fix shellcheck complaints about provisioning scripts
Also adds executable attributes to shell scripts that were missing it. Change-Id: Id52ef495147fdbfb5cb1a1f711fac530e0e85f3b Reviewed-by: Jukka Jokiniva <jukka.jokiniva@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
#!/bin/sh
|
||||
#!/bin/bash
|
||||
# Copyright (C) 2019 The Qt Company Ltd.
|
||||
# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
|
||||
|
||||
@@ -21,9 +21,12 @@ Download () {
|
||||
url="$1"
|
||||
targetFile="$2"
|
||||
|
||||
command -v curl >/dev/null \
|
||||
&& curl --fail -L --retry 5 --retry-delay 5 -o "$targetFile" "$url" \
|
||||
|| wget --tries 5 -O "$targetFile" "$url"
|
||||
if command -v curl >/dev/null
|
||||
then
|
||||
curl --fail -L --retry 5 --retry-delay 5 -o "$targetFile" "$url"
|
||||
else
|
||||
wget --tries 5 -O "$targetFile" "$url"
|
||||
fi
|
||||
}
|
||||
|
||||
VerifyHash () {
|
||||
@@ -61,10 +64,10 @@ DownloadURL () {
|
||||
url2=$2
|
||||
expectedHash=$3
|
||||
# Optional argument $4: destination filename
|
||||
if [ x"$4" = x ]
|
||||
if [ -z "$4" ]
|
||||
then
|
||||
# defaults to the last component of $url
|
||||
targetFile=$(echo $url | sed 's|^.*/||')
|
||||
targetFile="${url/*\//}"
|
||||
else
|
||||
targetFile=$4
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user