mirror of
git://code.qt.io/qt/qt5.git
synced 2026-02-01 19:36:04 +08:00
Provisioning: Remove logical OR when echo errors
set -e won't work if logical OR is used after commands. These error echo's need to be removed so that error catch will works. Also set -ex added to print executed command when error caught. Task-number: QTQAINFRA-1533 Change-Id: Ib4ea832a0ee813f99f59ebacad51ec57c3eff57d Reviewed-by: Tony Sarajärvi <tony.sarajarvi@qt.io>
This commit is contained in:
committed by
Tony Sarajärvi
parent
894c63834b
commit
0e278c4e95
@@ -35,18 +35,18 @@
|
||||
|
||||
# This script installs QNX 7.
|
||||
|
||||
set -e
|
||||
set -ex
|
||||
targetFolder="/opt/"
|
||||
sourceFile="http://ci-files01-hki.intra.qt.io/input/qnx/qnx700.tar.xz"
|
||||
sha1="949a87c5f00d0756956cb4b1b3b213ecaeee9113"
|
||||
folderName="qnx700"
|
||||
targetFile="qnx700.tar.xz"
|
||||
wget --tries=5 --waitretry=5 --output-document="$targetFile" "$sourceFile" || echo "Failed to download '$url' multiple times"
|
||||
echo "$sha1 $targetFile" | sha1sum --check || echo "Failed to check sha1sum"
|
||||
wget --tries=5 --waitretry=5 --output-document="$targetFile" "$sourceFile"
|
||||
echo "$sha1 $targetFile" | sha1sum --check
|
||||
if [ ! -d "$targetFolder" ]; then
|
||||
mkdir -p $targetFolder
|
||||
fi
|
||||
sudo tar -C $targetFolder -Jxf $targetFile|| echo "Failed to extract $targetFile"
|
||||
sudo tar -C $targetFolder -Jxf $targetFile
|
||||
sudo chown -R qt:users "$targetFolder"/"$folderName"
|
||||
|
||||
# Verify that we have last file in tar
|
||||
|
||||
@@ -43,7 +43,7 @@
|
||||
# E.g The Bluetooth features that require Android 21 will disable themselves dynamically when running on an Android 16 device.
|
||||
# That's why we need to use Andoid-21 API version in Qt 5.9.
|
||||
|
||||
set -e
|
||||
set -ex
|
||||
targetFolder="/opt/android"
|
||||
baseUrl="http://ci-files01-hki.intra.qt.io/input/android"
|
||||
|
||||
@@ -78,8 +78,8 @@ function InstallAndroidPackage {
|
||||
folderName=$7
|
||||
name=$8
|
||||
|
||||
sudo wget --tries=5 --waitretry=5 --output-document="$targetFile" "$url" || echo "Failed to download '$url' multiple times"
|
||||
echo "$sha1 $targetFile" | sha1sum --check || echo "Failed to check sha1sum"
|
||||
sudo wget --tries=5 --waitretry=5 --output-document="$targetFile" "$url"
|
||||
echo "$sha1 $targetFile" | sha1sum --check
|
||||
sudo chmod 755 "$targetFile"
|
||||
sudo $extract || echo "Failed to extract $url"
|
||||
sudo chown -R qt:users "$targetFolder"/"$folderName"
|
||||
@@ -89,10 +89,10 @@ function InstallAndroidPackage {
|
||||
|
||||
if [ -d "$targetFolder" ]; then
|
||||
echo "Removing old Android installation"
|
||||
sudo rm -fr "$targetFolder" || ( echo "Can't remove $targetFolder" ; exit 1; )
|
||||
sudo rm -fr "$targetFolder"
|
||||
fi
|
||||
|
||||
sudo mkdir "$targetFolder" || ( echo "Can't create $targetFolder" ; exit 1; )
|
||||
sudo mkdir "$targetFolder"
|
||||
|
||||
# Install Android SDK
|
||||
echo "Installing Android SDK version $sdkPackage..."
|
||||
@@ -104,7 +104,7 @@ InstallAndroidPackage "$targetFolder" $ndkPackage $ndkUrl $ndkSha1 $ndkTargetFil
|
||||
|
||||
# run update for Android SDK and install SDK API version 21, latest SDK tools, platform-tools and build-tools
|
||||
echo "Running Android SDK update for API version 21, SDK-tools, platform-tools and build-tools-$sdkBuildToolsVersion..."
|
||||
echo "y" |"$targetFolder"/sdk/tools/android update sdk --no-ui --all --filter $sdkApiLevel,tools,platform-tools,build-tools-$sdkBuildToolsVersion || echo "Failed to run update"
|
||||
echo "y" |"$targetFolder"/sdk/tools/android update sdk --no-ui --all --filter $sdkApiLevel,tools,platform-tools,build-tools-$sdkBuildToolsVersion
|
||||
|
||||
echo 'export ANDROID_API_VERSION=android-21' >> ~/.bashrc
|
||||
|
||||
|
||||
@@ -35,7 +35,7 @@
|
||||
|
||||
# This script installs the right ICU version
|
||||
|
||||
set -e
|
||||
set -ex
|
||||
icuVersion="56.1"
|
||||
icuLocation="/usr/lib64"
|
||||
sha1="f2eab775c04ce5f3bdae6c47d06b62158b5d6753"
|
||||
@@ -45,10 +45,10 @@ function Install7ZPackageFromURL {
|
||||
expectedSha1=$2
|
||||
targetDirectory=$3
|
||||
|
||||
targetFile=`mktemp` || echo "Failed to create temporary file"
|
||||
wget --tries=5 --waitretry=5 --output-document=$targetFile $url || echo "Failed to download '$url' multiple times"
|
||||
echo "$expectedSha1 $targetFile" | sha1sum --check || echo "Failed to check sha1sum"
|
||||
sudo /usr/local/bin/7z x -yo$targetDirectory $targetFile || echo "Failed to unzip $url archive"
|
||||
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
|
||||
}
|
||||
|
||||
@@ -61,7 +61,7 @@ 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` || echo "Failed to create temporary directory"
|
||||
tempDir=`mktemp -d`
|
||||
trap "sudo rm -fr $tempDir" EXIT
|
||||
Install7ZPackageFromURL $develPackageURL $sha1Dev $tempDir
|
||||
sudo cp -a $tempDir/lib/* /usr/lib64
|
||||
|
||||
@@ -39,7 +39,7 @@
|
||||
# A copy of the patch must be in the root of the Coin path in
|
||||
# provisioning/qnx/patch-660-4367-RS6069_cpp-headers.zip
|
||||
|
||||
set -e
|
||||
set -ex
|
||||
sha1="57a11ffe4434ad567b3c36f7b828dbb468a9e565"
|
||||
|
||||
function InstallZipPackageFromURL {
|
||||
@@ -47,12 +47,12 @@ function InstallZipPackageFromURL {
|
||||
expectedSha1=$2
|
||||
targetDirectory=$3
|
||||
|
||||
targetFile=`mktemp` || echo "Failed to create temporary file"
|
||||
wget --tries=5 --waitretry=5 --output-document=$targetFile $url || echo "Failed to download '$url' multiple times"
|
||||
echo "$expectedSha1 $targetFile" | sha1sum --check || echo "Failed to check sha1sum"
|
||||
targetFile=`mktemp`
|
||||
wget --tries=5 --waitretry=5 --output-document=$targetFile $url
|
||||
echo "$expectedSha1 $targetFile" | sha1sum --check
|
||||
|
||||
tempDir=`mktemp -d` || echo "Failed to create temporary directory"
|
||||
/usr/bin/unzip -o -d $tempDir $targetFile || echo "Failed to unzip $url archive"
|
||||
tempDir=`mktemp -d`
|
||||
/usr/bin/unzip -o -d $tempDir $targetFile
|
||||
trap "sudo rm -fr $targetFile $tempDir" EXIT
|
||||
|
||||
sudo cp -rafv $tempDir/patches/660-4367/target/* /opt/qnx660/target/
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
##
|
||||
#############################################################################
|
||||
|
||||
set -e
|
||||
set -ex
|
||||
|
||||
# This script will install ICU
|
||||
|
||||
@@ -47,20 +47,20 @@ develPackageURL="http://master.qt.io/development_releases/prebuilt/icu/prebuilt/
|
||||
|
||||
echo "Installing custom ICU $icuVersion $sha1 packages on RHEL to $icuLocation"
|
||||
|
||||
targetFile=`mktemp` || echo "Failed to create temporary file"
|
||||
wget --tries=5 --waitretry=5 --output-document=$targetFile $baseBinaryPackageURL || echo "Failed to download '$baseBinaryPackageURL' multiple times"
|
||||
echo "$sha1 $targetFile" | sha1sum --check || echo "Failed to check sha1sum"
|
||||
sudo 7z x -y -o"/usr/lib64" $targetFile || echo "Failed to unzip $baseBinaryPackageURL archive"
|
||||
targetFile=`mktemp`
|
||||
wget --tries=5 --waitretry=5 --output-document=$targetFile $baseBinaryPackageURL
|
||||
echo "$sha1 $targetFile" | sha1sum --check
|
||||
sudo 7z x -y -o"/usr/lib64" $targetFile
|
||||
sudo rm $targetFile
|
||||
|
||||
echo "Installing custom ICU devel packages on RHEL"
|
||||
|
||||
tempDir=`mktemp -d` || echo "Failed to create temporary directory"
|
||||
tempDir=`mktemp -d`
|
||||
|
||||
targetFile=`mktemp` || echo "Failed to create temporary file"
|
||||
wget --tries=5 --waitretry=5 --output-document=$targetFile $develPackageURL || echo "Failed to download '$develPackageURL' multiple times"
|
||||
echo "$sha1Dev $targetFile" | sha1sum --check || echo "Failed to check sha1sum"
|
||||
7z x -y -o$tempDir $targetFile || echo "Failed to unzip $develPackageURL archive"
|
||||
targetFile=`mktemp`
|
||||
wget --tries=5 --waitretry=5 --output-document=$targetFile $develPackageURL
|
||||
echo "$sha1Dev $targetFile" | sha1sum --check
|
||||
7z x -y -o$tempDir $targetFile
|
||||
|
||||
sudo cp -a $tempDir/lib/* /usr/lib64
|
||||
sudo cp -a $tempDir/* /usr/
|
||||
|
||||
@@ -32,11 +32,11 @@
|
||||
##
|
||||
#############################################################################
|
||||
|
||||
set -e
|
||||
set -ex
|
||||
# build latest qemu to usermode
|
||||
sudo apt-get -y install automake autoconf libtool
|
||||
|
||||
tempDir=$(mktemp -d) || echo "Failed to create temporary directory"
|
||||
tempDir=$(mktemp -d)
|
||||
git clone git://git.qemu.org/qemu.git "$tempDir"
|
||||
cd "$tempDir"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user