summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTony Sarajärvi <tony.sarajarvi@qt.io>2018-04-11 10:12:09 +0300
committerLiang Qi <liang.qi@qt.io>2018-04-15 16:40:49 +0000
commitcd347c86afe3307e1b25c0301965099c1c012fc0 (patch)
tree25187bc362cee30e290957099e1854e062b1b7de
parent6df84f898459eb18d92c7adeaf8bca1817c2778b (diff)
Fix shellcheck complaints in RHEL 6.6 provisioning scripts
Change-Id: Idb4240b4cfd309b2c6c418e8c18b175a491f8eea Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io> Reviewed-by: Heikki Halmet <heikki.halmet@qt.io>
-rwxr-xr-xcoin/provisioning/qtci-linux-RHEL-6.6-x86_64/01-systemsetup.sh2
-rwxr-xr-xcoin/provisioning/qtci-linux-RHEL-6.6-x86_64/02-disable-ntp.sh1
-rwxr-xr-xcoin/provisioning/qtci-linux-RHEL-6.6-x86_64/03-install-rhel-epel.sh1
-rwxr-xr-xcoin/provisioning/qtci-linux-RHEL-6.6-x86_64/08-libclang.sh5
-rwxr-xr-xcoin/provisioning/qtci-linux-RHEL-6.6-x86_64/09-cmake.sh2
-rwxr-xr-xcoin/provisioning/qtci-linux-RHEL-6.6-x86_64/22-mqtt_broker.sh1
-rwxr-xr-xcoin/provisioning/qtci-linux-RHEL-6.6-x86_64/30-install_icu.sh19
-rwxr-xr-xcoin/provisioning/qtci-linux-RHEL-6.6-x86_64/99-version.sh3
8 files changed, 21 insertions, 13 deletions
diff --git a/coin/provisioning/qtci-linux-RHEL-6.6-x86_64/01-systemsetup.sh b/coin/provisioning/qtci-linux-RHEL-6.6-x86_64/01-systemsetup.sh
index fc07e6fa..99612260 100755
--- a/coin/provisioning/qtci-linux-RHEL-6.6-x86_64/01-systemsetup.sh
+++ b/coin/provisioning/qtci-linux-RHEL-6.6-x86_64/01-systemsetup.sh
@@ -35,8 +35,10 @@
set -ex
+# shellcheck source=../common/unix/check_and_set_proxy.sh
source "${BASH_SOURCE%/*}/../common/unix/check_and_set_proxy.sh"
+# shellcheck disable=SC2031
if [ "$http_proxy" != "" ]; then
echo "proxy=$proxy" | sudo tee -a /etc/yum.conf
fi
diff --git a/coin/provisioning/qtci-linux-RHEL-6.6-x86_64/02-disable-ntp.sh b/coin/provisioning/qtci-linux-RHEL-6.6-x86_64/02-disable-ntp.sh
index ca31a876..89806892 100755
--- a/coin/provisioning/qtci-linux-RHEL-6.6-x86_64/02-disable-ntp.sh
+++ b/coin/provisioning/qtci-linux-RHEL-6.6-x86_64/02-disable-ntp.sh
@@ -1,3 +1,4 @@
#!/usr/bin/env bash
+# shellcheck source=../common/linux/disable-ntp_linux.sh
source "${BASH_SOURCE%/*}/../common/linux/disable-ntp_linux.sh"
diff --git a/coin/provisioning/qtci-linux-RHEL-6.6-x86_64/03-install-rhel-epel.sh b/coin/provisioning/qtci-linux-RHEL-6.6-x86_64/03-install-rhel-epel.sh
index e31f4869..21a45506 100755
--- a/coin/provisioning/qtci-linux-RHEL-6.6-x86_64/03-install-rhel-epel.sh
+++ b/coin/provisioning/qtci-linux-RHEL-6.6-x86_64/03-install-rhel-epel.sh
@@ -33,6 +33,7 @@
##
#############################################################################
+# shellcheck source=../common/unix/DownloadURL.sh
source "${BASH_SOURCE%/*}/../common/unix/DownloadURL.sh"
package="epel-release-6-8.noarch.rpm"
diff --git a/coin/provisioning/qtci-linux-RHEL-6.6-x86_64/08-libclang.sh b/coin/provisioning/qtci-linux-RHEL-6.6-x86_64/08-libclang.sh
index fb5a81b3..7d96209c 100755
--- a/coin/provisioning/qtci-linux-RHEL-6.6-x86_64/08-libclang.sh
+++ b/coin/provisioning/qtci-linux-RHEL-6.6-x86_64/08-libclang.sh
@@ -3,9 +3,10 @@
set -ex
BASEDIR=$(dirname "$0")
-. $BASEDIR/../common/shared/sw_versions.txt
+# shellcheck source=../common/shared/sw_versions.txt
+. "$BASEDIR/../common/shared/sw_versions.txt"
VERSION=$libclang_version
URL="https://download.qt.io/development_releases/prebuilt/libclang/libclang-release_${VERSION//\./}-linux-Rhel6.6-gcc4.9-x86_64.7z"
SHA1="c7466109628418a6aa3db8b3f5825f847f1c4952"
-$BASEDIR/../common/unix/libclang.sh "$URL" "$SHA1" "$VERSION"
+"$BASEDIR/../common/unix/libclang.sh" "$URL" "$SHA1" "$VERSION"
diff --git a/coin/provisioning/qtci-linux-RHEL-6.6-x86_64/09-cmake.sh b/coin/provisioning/qtci-linux-RHEL-6.6-x86_64/09-cmake.sh
index 572ad7ad..74520b6e 100755
--- a/coin/provisioning/qtci-linux-RHEL-6.6-x86_64/09-cmake.sh
+++ b/coin/provisioning/qtci-linux-RHEL-6.6-x86_64/09-cmake.sh
@@ -1,4 +1,4 @@
#!/usr/bin/env bash
set -ex
-$(dirname $0)/../common/linux/cmake_linux.sh
+"$(dirname "$0")/../common/linux/cmake_linux.sh"
diff --git a/coin/provisioning/qtci-linux-RHEL-6.6-x86_64/22-mqtt_broker.sh b/coin/provisioning/qtci-linux-RHEL-6.6-x86_64/22-mqtt_broker.sh
index 04c09770..505374c5 100755
--- a/coin/provisioning/qtci-linux-RHEL-6.6-x86_64/22-mqtt_broker.sh
+++ b/coin/provisioning/qtci-linux-RHEL-6.6-x86_64/22-mqtt_broker.sh
@@ -33,4 +33,5 @@
##
#############################################################################
+# shellcheck source=../common/unix/mqtt_broker.sh
source "${BASH_SOURCE%/*}/../common/unix/mqtt_broker.sh"
diff --git a/coin/provisioning/qtci-linux-RHEL-6.6-x86_64/30-install_icu.sh b/coin/provisioning/qtci-linux-RHEL-6.6-x86_64/30-install_icu.sh
index e4492eb0..67c17954 100755
--- a/coin/provisioning/qtci-linux-RHEL-6.6-x86_64/30-install_icu.sh
+++ b/coin/provisioning/qtci-linux-RHEL-6.6-x86_64/30-install_icu.sh
@@ -45,27 +45,28 @@ function Install7ZPackageFromURL {
expectedSha1=$2
targetDirectory=$3
- targetFile=`mktemp`
- wget --tries=5 --waitretry=5 --output-document=$targetFile $url
+ targetFile=$(mktemp)
+ wget --tries=5 --waitretry=5 --output-document="$targetFile" "$url"
echo "$expectedSha1 $targetFile" | sha1sum --check
- sudo /usr/local/bin/7z x -yo$targetDirectory $targetFile
- rm $targetFile
+ sudo /usr/local/bin/7z x -yo"$targetDirectory" "$targetFile"
+ rm "$targetFile"
}
echo "Installing custom ICU $icuVersion $sha1 packages on RHEL to $icuLocation"
baseBinaryPackageURL="http://master.qt.io/development_releases/prebuilt/icu/prebuilt/$icuVersion/icu-linux-g++-Rhel6.6-x64.7z"
-Install7ZPackageFromURL $baseBinaryPackageURL $sha1 "/usr/lib64"
+Install7ZPackageFromURL "$baseBinaryPackageURL" "$sha1" "/usr/lib64"
echo "Installing custom ICU devel packages on RHEL"
sha1Dev="82f8b216371b848b8d36ecec7fe7b6e9b0dba0df"
develPackageURL="http://master.qt.io/development_releases/prebuilt/icu/prebuilt/$icuVersion/icu-linux-g++-Rhel6.6-x64-devel.7z"
-tempDir=`mktemp -d`
+tempDir=$(mktemp -d)
+# shellcheck disable=SC2064
trap "sudo rm -fr $tempDir" EXIT
-Install7ZPackageFromURL $develPackageURL $sha1Dev $tempDir
-sudo cp -a $tempDir/lib/* /usr/lib64
-sudo cp -a $tempDir/* /usr/
+Install7ZPackageFromURL "$develPackageURL" "$sha1Dev" "$tempDir"
+sudo cp -a "$tempDir/lib"/* /usr/lib64
+sudo cp -a "$tempDir"/* /usr/
sudo /sbin/ldconfig
diff --git a/coin/provisioning/qtci-linux-RHEL-6.6-x86_64/99-version.sh b/coin/provisioning/qtci-linux-RHEL-6.6-x86_64/99-version.sh
index 739d06b6..1354bf6b 100755
--- a/coin/provisioning/qtci-linux-RHEL-6.6-x86_64/99-version.sh
+++ b/coin/provisioning/qtci-linux-RHEL-6.6-x86_64/99-version.sh
@@ -39,9 +39,10 @@
set -ex
+# shellcheck disable=SC2129
echo "*********************************************" >> ~/versions.txt
echo "***** All installed RPM packages *****" >> ~/versions.txt
rpm -q -a | sort >> ~/versions.txt
echo "*********************************************" >> ~/versions.txt
-$(dirname $0)/../common/linux/version.sh
+"$(dirname "$0")/../common/linux/version.sh"