mirror of
git://code.qt.io/qt/qt5.git
synced 2026-05-09 12:37:50 +08:00
Fix shellcheck problems
Change-Id: I277fd923f62aa5888d7e18c89471909732da30e5 Reviewed-by: Liang Qi <liang.qi@qt.io>
This commit is contained in:
@@ -27,10 +27,10 @@ DownloadAndExtract () {
|
|||||||
sourceFile="http://ci-files01-hki.ci.qt.io/input/axivion/bauhaus-suite-7_7_4-x86_64-gnu_linux.tar.gz"
|
sourceFile="http://ci-files01-hki.ci.qt.io/input/axivion/bauhaus-suite-7_7_4-x86_64-gnu_linux.tar.gz"
|
||||||
targetFile="bauhaus-suite-7_7_4-x86_64-gnu_linux.tar.gz"
|
targetFile="bauhaus-suite-7_7_4-x86_64-gnu_linux.tar.gz"
|
||||||
sha1="df17ac0521864a7f1c0b5b3bfded1817cbf47bae"
|
sha1="df17ac0521864a7f1c0b5b3bfded1817cbf47bae"
|
||||||
cd $HOME
|
cd "$HOME"
|
||||||
DownloadAndExtract "$sourceFile" "$sha1" "$targetFile" "$HOME"
|
DownloadAndExtract "$sourceFile" "$sha1" "$targetFile" "$HOME"
|
||||||
|
|
||||||
mkdir $HOME/.bauhaus
|
mkdir "$HOME/.bauhaus"
|
||||||
cd "$HOME/.bauhaus"
|
cd "$HOME/.bauhaus"
|
||||||
wget http://ci-files01-hki.ci.qt.io/input/axivion/Qt_Evaluation_QSR_INTERN_20250118.key
|
wget http://ci-files01-hki.ci.qt.io/input/axivion/Qt_Evaluation_QSR_INTERN_20250118.key
|
||||||
cd "$HOME"
|
cd "$HOME"
|
||||||
|
|||||||
@@ -8,6 +8,7 @@
|
|||||||
|
|
||||||
|
|
||||||
PROVISIONING_DIR="$(dirname "$0")/../.."
|
PROVISIONING_DIR="$(dirname "$0")/../.."
|
||||||
|
# shellcheck source=../unix/common.sourced.sh
|
||||||
source "$PROVISIONING_DIR/common/unix/common.sourced.sh"
|
source "$PROVISIONING_DIR/common/unix/common.sourced.sh"
|
||||||
|
|
||||||
|
|
||||||
@@ -21,8 +22,7 @@ then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# Verify that yama.ptrace_scope = 0, if it's supported by the kernel.
|
# Verify that yama.ptrace_scope = 0, if it's supported by the kernel.
|
||||||
ptrace_scope_value=`sudo sysctl kernel.yama.ptrace_scope 2>/dev/null \
|
ptrace_scope_value=$(sudo sysctl kernel.yama.ptrace_scope 2>/dev/null | sed -E 's/.*([0-9])$/\1/')
|
||||||
| sed -E 's/.*([0-9])$/\1/'`
|
|
||||||
if [ -n "$ptrace_scope_value" ] && [ "$ptrace_scope_value" != 0 ]
|
if [ -n "$ptrace_scope_value" ] && [ "$ptrace_scope_value" != 0 ]
|
||||||
then
|
then
|
||||||
fatal "kernel.yama.ptrace_scope = $ptrace_scope_value \
|
fatal "kernel.yama.ptrace_scope = $ptrace_scope_value \
|
||||||
|
|||||||
@@ -7,16 +7,16 @@ echo "Installing vcpkg android ports"
|
|||||||
pushd "${BASH_SOURCE%/*}/vcpkg" || exit
|
pushd "${BASH_SOURCE%/*}/vcpkg" || exit
|
||||||
cp "${BASH_SOURCE%/*}/../shared/vcpkg-configuration.json" .
|
cp "${BASH_SOURCE%/*}/../shared/vcpkg-configuration.json" .
|
||||||
|
|
||||||
$VCPKG_ROOT/vcpkg install --triplet x86-android-qt --x-install-root x86-android-qt-tmp --debug
|
"$VCPKG_ROOT/vcpkg" install --triplet x86-android-qt --x-install-root x86-android-qt-tmp --debug
|
||||||
$VCPKG_ROOT/vcpkg install --triplet x86_64-android-qt --x-install-root x86_64-android-qt-tmp --debug
|
"$VCPKG_ROOT/vcpkg" install --triplet x86_64-android-qt --x-install-root x86_64-android-qt-tmp --debug
|
||||||
|
|
||||||
mkdir -p $VCPKG_ROOT/installed
|
mkdir -p "$VCPKG_ROOT/installed"
|
||||||
cp -R x86-android-qt-tmp/* $VCPKG_ROOT/installed/
|
cp -R x86-android-qt-tmp/* "$VCPKG_ROOT/installed/"
|
||||||
cp -R x86_64-android-qt-tmp/* $VCPKG_ROOT/installed/
|
cp -R x86_64-android-qt-tmp/* "$VCPKG_ROOT/installed/"
|
||||||
|
|
||||||
versions=$(jq -r '.overrides[] | "vcpkg \(.name) for android = \(.version)"' vcpkg.json)
|
versions=$(jq -r '.overrides[] | "vcpkg \(.name) for android = \(.version)"' vcpkg.json)
|
||||||
versions="${versions//vcpkg/\\nvcpkg}"
|
versions="${versions//vcpkg/\\nvcpkg}"
|
||||||
echo $versions >> ~/versions.txt
|
echo "$versions" >> ~/versions.txt
|
||||||
|
|
||||||
rm -rf x86-android-qt-tmp
|
rm -rf x86-android-qt-tmp
|
||||||
rm -rf x86_64-android-qt-tmp
|
rm -rf x86_64-android-qt-tmp
|
||||||
|
|||||||
@@ -7,14 +7,14 @@ echo "Installing vcpkg ports"
|
|||||||
pushd "${BASH_SOURCE%/*}/vcpkg" || exit
|
pushd "${BASH_SOURCE%/*}/vcpkg" || exit
|
||||||
cp "${BASH_SOURCE%/*}/../shared/vcpkg-configuration.json" .
|
cp "${BASH_SOURCE%/*}/../shared/vcpkg-configuration.json" .
|
||||||
|
|
||||||
$VCPKG_ROOT/vcpkg install --triplet x64-linux-qt --x-install-root x64-linux-qt-tmp --debug
|
"$VCPKG_ROOT/vcpkg" install --triplet x64-linux-qt --x-install-root x64-linux-qt-tmp --debug
|
||||||
|
|
||||||
mkdir -p "$VCPKG_ROOT/installed"
|
mkdir -p "$VCPKG_ROOT/installed"
|
||||||
cp -R x64-linux-qt-tmp/* $VCPKG_ROOT/installed/
|
cp -R x64-linux-qt-tmp/* "$VCPKG_ROOT/installed/"
|
||||||
|
|
||||||
versions=$(jq -r '.overrides[] | "vcpkg \(.name) = \(.version)"' vcpkg.json)
|
versions=$(jq -r '.overrides[] | "vcpkg \(.name) = \(.version)"' vcpkg.json)
|
||||||
versions="${versions//vcpkg/\\nvcpkg}"
|
versions="${versions//vcpkg/\\nvcpkg}"
|
||||||
echo $versions >> ~/versions.txt
|
echo "$versions" >> ~/versions.txt
|
||||||
|
|
||||||
rm -rf x64-linux-qt-tmp
|
rm -rf x64-linux-qt-tmp
|
||||||
|
|
||||||
|
|||||||
@@ -28,11 +28,11 @@ vcpkgToolSourceFolder="$HOME/vcpkg-tool-$vcpkgToolReleaseTag"
|
|||||||
vcpkgToolBuildFolder="$HOME/vcpkg-tool-$vcpkgToolReleaseTag/build"
|
vcpkgToolBuildFolder="$HOME/vcpkg-tool-$vcpkgToolReleaseTag/build"
|
||||||
|
|
||||||
InstallFromCompressedFileFromURL "$vcpkgToolCacheUrl" "$vcpkgToolOfficialUrl" "$vcpkgToolSHA1" "$HOME" ""
|
InstallFromCompressedFileFromURL "$vcpkgToolCacheUrl" "$vcpkgToolOfficialUrl" "$vcpkgToolSHA1" "$HOME" ""
|
||||||
cmake -S $vcpkgToolSourceFolder -B $vcpkgToolBuildFolder -GNinja -DCMAKE_BUILD_TYPE=Release -DBUILD_TESTING=OFF -DVCPKG_DEVELOPMENT_WARNINGS=OFF
|
cmake -S "$vcpkgToolSourceFolder" -B "$vcpkgToolBuildFolder" -GNinja -DCMAKE_BUILD_TYPE=Release -DBUILD_TESTING=OFF -DVCPKG_DEVELOPMENT_WARNINGS=OFF
|
||||||
cmake --build $vcpkgToolBuildFolder --parallel
|
cmake --build "$vcpkgToolBuildFolder" --parallel
|
||||||
|
|
||||||
cp $vcpkgToolBuildFolder/vcpkg $vcpkgRoot/
|
cp "$vcpkgToolBuildFolder/vcpkg" "$vcpkgRoot/"
|
||||||
rm -rf $vcpkgToolSourceFolder
|
rm -rf "$vcpkgToolSourceFolder"
|
||||||
|
|
||||||
if [ ! -f "$vcpkgRoot/vcpkg" ]
|
if [ ! -f "$vcpkgRoot/vcpkg" ]
|
||||||
then
|
then
|
||||||
|
|||||||
@@ -12,13 +12,13 @@ dir_length=${#dir}
|
|||||||
dylib_regex="^$dir/.*\.dylib$"
|
dylib_regex="^$dir/.*\.dylib$"
|
||||||
|
|
||||||
find "$dir" -type f -name '*.dylib' | while read -r library_path; do
|
find "$dir" -type f -name '*.dylib' | while read -r library_path; do
|
||||||
install_name=$(otool -D "$library_path" | sed -n '2p' | egrep "$dylib_regex" )
|
install_name=$(otool -D "$library_path" | sed -n '2p' | grep -E "$dylib_regex" )
|
||||||
if [ -n "$install_name" ]; then
|
if [ -n "$install_name" ]; then
|
||||||
fixed_install_name="@rpath${install_name:dir_length}"
|
fixed_install_name="@rpath${install_name:dir_length}"
|
||||||
install_name_tool -id "$fixed_install_name" "$library_path"
|
install_name_tool -id "$fixed_install_name" "$library_path"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
otool -L "$library_path" | awk '/\t/ {print $1}' | egrep "$dylib_regex" | while read -r dependency_path; do
|
otool -L "$library_path" | awk '/\t/ {print $1}' | grep -E "$dylib_regex" | while read -r dependency_path; do
|
||||||
fixed_dependency_path="@loader_path${dependency_path:dir_length}"
|
fixed_dependency_path="@loader_path${dependency_path:dir_length}"
|
||||||
install_name_tool -change "$dependency_path" "$fixed_dependency_path" "$library_path"
|
install_name_tool -change "$dependency_path" "$fixed_dependency_path" "$library_path"
|
||||||
done
|
done
|
||||||
|
|||||||
@@ -50,7 +50,7 @@ VerifyHash () {
|
|||||||
*) echo "FATAL! Unknown hash length: $hashLength" 1>&2 ;;
|
*) echo "FATAL! Unknown hash length: $hashLength" 1>&2 ;;
|
||||||
esac | cut -d ' ' -f 1`
|
esac | cut -d ' ' -f 1`
|
||||||
|
|
||||||
if [ -z $hash ] || [ ! "$expectedHash" = "$hash" ]
|
if [ -z "$hash" ] || [ ! "$expectedHash" = "$hash" ]
|
||||||
then
|
then
|
||||||
echo "FAIL! wrong file hash: $file $hash" 1>&2
|
echo "FAIL! wrong file hash: $file $hash" 1>&2
|
||||||
return 1
|
return 1
|
||||||
|
|||||||
@@ -22,7 +22,7 @@ prefix="/usr/local/ios/ffmpeg"
|
|||||||
|
|
||||||
if [ ! -d "$ffmpeg_source_dir" ];
|
if [ ! -d "$ffmpeg_source_dir" ];
|
||||||
then
|
then
|
||||||
InstallFromCompressedFileFromURL "$url_cached" "$url_public" "$sha1" "$target_dir" "$app_prefix"
|
InstallFromCompressedFileFromURL "$url_cached" "$url_public" "$sha1" "$target_dir"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
ffmpeg_config_options=$(cat "${BASH_SOURCE%/*}/../shared/ffmpeg_config_options.txt")
|
ffmpeg_config_options=$(cat "${BASH_SOURCE%/*}/../shared/ffmpeg_config_options.txt")
|
||||||
@@ -44,7 +44,8 @@ build_ffmpeg_ios() {
|
|||||||
sudo mkdir -p "$build_dir"
|
sudo mkdir -p "$build_dir"
|
||||||
pushd "$build_dir"
|
pushd "$build_dir"
|
||||||
|
|
||||||
sudo $ffmpeg_source_dir/configure $ffmpeg_config_options \
|
# shellcheck disable=SC2086
|
||||||
|
sudo "$ffmpeg_source_dir/configure" $ffmpeg_config_options \
|
||||||
--sysroot="$(xcrun --sdk "$target_sdk" --show-sdk-path)" \
|
--sysroot="$(xcrun --sdk "$target_sdk" --show-sdk-path)" \
|
||||||
--enable-cross-compile \
|
--enable-cross-compile \
|
||||||
--enable-optimizations \
|
--enable-optimizations \
|
||||||
|
|||||||
@@ -86,7 +86,7 @@ elif [ "$os" == "macos" ] || [ "$os" == "macos-universal" ]; then
|
|||||||
fix_relative_dependencies="${BASH_SOURCE%/*}/../macos/fix_relative_dependencies.sh"
|
fix_relative_dependencies="${BASH_SOURCE%/*}/../macos/fix_relative_dependencies.sh"
|
||||||
|
|
||||||
xcode_major_version=$(xcodebuild -version | awk 'NR==1 {split($2, a, "."); print a[1]}')
|
xcode_major_version=$(xcodebuild -version | awk 'NR==1 {split($2, a, "."); print a[1]}')
|
||||||
if [ $xcode_major_version -ge 15 ]; then
|
if [ "$xcode_major_version" -ge 15 ]; then
|
||||||
# fix the error: duplicate symbol '_av_ac3_parse_header'
|
# fix the error: duplicate symbol '_av_ac3_parse_header'
|
||||||
ffmpeg_config_options+=" --extra-ldflags=-Wl,-ld_classic"
|
ffmpeg_config_options+=" --extra-ldflags=-Wl,-ld_classic"
|
||||||
fi
|
fi
|
||||||
|
|||||||
@@ -36,16 +36,12 @@ sudo mkdir "$testSuiteLocal"
|
|||||||
# Check which platform
|
# Check which platform
|
||||||
if uname -a |grep -q Darwin; then
|
if uname -a |grep -q Darwin; then
|
||||||
usersGroup="staff"
|
usersGroup="staff"
|
||||||
squishLicenseDir="/Users/qt"
|
|
||||||
elif uname -a |grep -q "el7"; then
|
elif uname -a |grep -q "el7"; then
|
||||||
usersGroup="qt"
|
usersGroup="qt"
|
||||||
squishLicenseDir="/root"
|
|
||||||
elif uname -a |grep -q "Ubuntu"; then
|
elif uname -a |grep -q "Ubuntu"; then
|
||||||
usersGroup="users"
|
usersGroup="users"
|
||||||
squishLicenseDir="/home/qt"
|
|
||||||
else
|
else
|
||||||
usersGroup="users"
|
usersGroup="users"
|
||||||
squishLicenseDir="/root"
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
targetFileMount="$mountFolder"/"$compressedFolder"
|
targetFileMount="$mountFolder"/"$compressedFolder"
|
||||||
|
|||||||
@@ -2,6 +2,8 @@
|
|||||||
# Copyright (C) 2021 The Qt Company Ltd.
|
# Copyright (C) 2021 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
|
# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
|
||||||
|
|
||||||
|
set -ex
|
||||||
|
|
||||||
# Setups sbuild environment
|
# Setups sbuild environment
|
||||||
|
|
||||||
tee ~/.sbuildrc << EOF
|
tee ~/.sbuildrc << EOF
|
||||||
@@ -44,8 +46,8 @@ sudo sbuild-createchroot --include=eatmydata,ccache,gnupg,ca-certificates stable
|
|||||||
|
|
||||||
echo "Create chroot for Ubuntu Jammy"
|
echo "Create chroot for Ubuntu Jammy"
|
||||||
# First we need update the deboostrap scripts
|
# First we need update the deboostrap scripts
|
||||||
mkdir -p $HOME/deboot
|
mkdir -p "$HOME"/deboot
|
||||||
cd $HOME/deboot
|
cd "$HOME"/deboot
|
||||||
# Orig url http://ftp.fi.debian.org/debian/pool/main/d/debootstrap/debootstrap_1.0.134~bpo12+1.tar.gz
|
# Orig url http://ftp.fi.debian.org/debian/pool/main/d/debootstrap/debootstrap_1.0.134~bpo12+1.tar.gz
|
||||||
# we have to update the debootstrap so that sbuild-createroot will recognize jammy code name
|
# we have to update the debootstrap so that sbuild-createroot will recognize jammy code name
|
||||||
wget http://ci-files01-hki.ci.qt.io/input/debian/debootstrap/debootstrap_1.0.134~bpo12+1.tar.gz
|
wget http://ci-files01-hki.ci.qt.io/input/debian/debootstrap/debootstrap_1.0.134~bpo12+1.tar.gz
|
||||||
@@ -53,7 +55,7 @@ tar xzvf debootstrap_1.0.134~bpo12+1.tar.gz
|
|||||||
cd debootstrap
|
cd debootstrap
|
||||||
sudo make install
|
sudo make install
|
||||||
cd
|
cd
|
||||||
rm -rf $HOME/deboot
|
rm -rf "$HOME"/deboot
|
||||||
sudo sbuild-createchroot --include=gnupg,ca-certificates jammy /srv/chroot/jammy-arm64 http://ports.ubuntu.com/ubuntu-ports/
|
sudo sbuild-createchroot --include=gnupg,ca-certificates jammy /srv/chroot/jammy-arm64 http://ports.ubuntu.com/ubuntu-ports/
|
||||||
echo "Done creating chroot for Ubuntu Jammy"
|
echo "Done creating chroot for Ubuntu Jammy"
|
||||||
|
|
||||||
|
|||||||
@@ -42,7 +42,7 @@
|
|||||||
|
|
||||||
# This script installs python3
|
# This script installs python3
|
||||||
|
|
||||||
# shellcheck source=../unix/SetEnvVar.sh
|
# shellcheck source=../common/unix/SetEnvVar.sh
|
||||||
source "${BASH_SOURCE%/*}/../common/unix/SetEnvVar.sh"
|
source "${BASH_SOURCE%/*}/../common/unix/SetEnvVar.sh"
|
||||||
|
|
||||||
# Try with default
|
# Try with default
|
||||||
|
|||||||
@@ -42,7 +42,7 @@
|
|||||||
|
|
||||||
# This script installs python3
|
# This script installs python3
|
||||||
|
|
||||||
# shellcheck source=../unix/SetEnvVar.sh
|
# shellcheck source=../common/unix/SetEnvVar.sh
|
||||||
source "${BASH_SOURCE%/*}/../common/unix/SetEnvVar.sh"
|
source "${BASH_SOURCE%/*}/../common/unix/SetEnvVar.sh"
|
||||||
|
|
||||||
# Try with default
|
# Try with default
|
||||||
|
|||||||
@@ -42,7 +42,7 @@
|
|||||||
|
|
||||||
# This script installs python3
|
# This script installs python3
|
||||||
|
|
||||||
# shellcheck source=../unix/SetEnvVar.sh
|
# shellcheck source=../common/unix/SetEnvVar.sh
|
||||||
source "${BASH_SOURCE%/*}/../common/unix/SetEnvVar.sh"
|
source "${BASH_SOURCE%/*}/../common/unix/SetEnvVar.sh"
|
||||||
|
|
||||||
# Try with default
|
# Try with default
|
||||||
|
|||||||
@@ -42,7 +42,7 @@
|
|||||||
|
|
||||||
# This script installs python3
|
# This script installs python3
|
||||||
|
|
||||||
# shellcheck source=../unix/SetEnvVar.sh
|
# shellcheck source=../common/unix/SetEnvVar.sh
|
||||||
source "${BASH_SOURCE%/*}/../common/unix/SetEnvVar.sh"
|
source "${BASH_SOURCE%/*}/../common/unix/SetEnvVar.sh"
|
||||||
|
|
||||||
# Try with default
|
# Try with default
|
||||||
|
|||||||
Reference in New Issue
Block a user