Revision control
Copy as Markdown
#!/usr/bin/env bash
#Copyright (C) 2026 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
set -ex
# shellcheck source=../common/unix/DownloadURL.sh
source "${BASH_SOURCE%/*}/../common/unix/DownloadURL.sh"
# shellcheck source=../common/unix/SetEnvVar.sh
source "${BASH_SOURCE%/*}/../common/unix/SetEnvVar.sh"
checksum="83051570e514a10b6f60d732cd2c35eb3fcc9d3d"
target=swiftly.tar.gz
DownloadURL $url_cached $url $checksum $target
tar zxf swiftly.tar.gz
./swiftly init --quiet-shell-followup -y --skip-install
# Swift 6.4.0 is not found for Ubuntu 24.04
# Pin to a toolchain that is published for Ubuntu 24.04.
swift_version="6.3.3"
source "${HOME}/.local/share/swiftly/env.sh"
swiftly install "$swift_version" --use --assume-yes
# The installer leaves out line feed when modifying .profile
echo " " >> /home/qt/.profile