mirror of
https://github.com/actions/runner-images.git
synced 2025-12-17 23:28:57 +00:00
fixed swift.sh
This commit is contained in:
@@ -6,11 +6,16 @@
|
|||||||
|
|
||||||
# Install # Install
|
# Install # Install
|
||||||
image_label="$(lsb_release -rs)"
|
image_label="$(lsb_release -rs)"
|
||||||
wget https://swift.org/builds/swift-5.1.5-release/ubuntu${image_label//./}/swift-5.1.5-RELEASE/swift-5.1.5-RELEASE-ubuntu$image_label.tar.gz
|
swift_version="5.1.5"
|
||||||
tar xzf swift-5.1.5-RELEASE-ubuntu$image_label.tar.gz
|
|
||||||
sudo mv swift-5.1.5-RELEASE-ubuntu$image_label /usr/share/swift
|
wget -P /tmp https://swift.org/builds/swift-$swift_version-release/ubuntu${image_label//./}/swift-$swift_version-RELEASE/swift-$swift_version-RELEASE-ubuntu$image_label.tar.gz
|
||||||
sudo echo "PATH=/usr/share/swift/usr/bin:$PATH" | sudo tee -a /etc/environment
|
tar xzf /tmp/swift-$swift_version-RELEASE-ubuntu$image_label.tar.gz
|
||||||
source ~/.bashrc
|
sudo mv swift-$swift_version-RELEASE-ubuntu$image_label /usr/share/swift
|
||||||
|
|
||||||
|
SWIFT_DIR="/usr/share/swift/usr/bin/swift"
|
||||||
|
SWIFT_PATH="/usr/share/swift/usr/bin"
|
||||||
|
sudo ln -s "$SWIFT_DIR" /usr/local/bin/swift
|
||||||
|
echo "SWIFT_PATH =$SWIFT_PATH" | sudo tee -a /etc/environment
|
||||||
|
|
||||||
# Run tests to determine that the software installed as expected
|
# Run tests to determine that the software installed as expected
|
||||||
echo "Testing to make sure that script performed as expected, and basic scenarios work"
|
echo "Testing to make sure that script performed as expected, and basic scenarios work"
|
||||||
|
|||||||
Reference in New Issue
Block a user