Skip to content

Instantly share code, notes, and snippets.

@maximkrouk
Last active January 3, 2020 10:14
Show Gist options
  • Save maximkrouk/7e74d1c02ba473ab0b6c4f87f095fa9a to your computer and use it in GitHub Desktop.
Save maximkrouk/7e74d1c02ba473ab0b6c4f87f095fa9a to your computer and use it in GitHub Desktop.
Install swift 5.1.3 on ubuntu
echo 'Preparations'
cd ~
mkdir SwiftSetup
cd ~/SwiftSetup
mkdir Backup
echo 'cd to ~/SwiftSetup'
echo 'Fetching dependencies: clang, libicu-dev libssl-dev openssl'
sudo apt-get install clang libicu-dev libssl-dev openssl
echo 'Downloading Swift 5.1.3 release archive for Ubuntu16.04'
wget https://swift.org/builds/swift-5.1.3-release/ubuntu1604/swift-5.1.3-RELEASE/swift-5.1.3-RELEASE-ubuntu16.04.tar.gz
echo 'Downloading Swift 5.1.3 archive signature'
https://swift.org/builds/swift-5.1.3-release/ubuntu1604/swift-5.1.3-RELEASE/swift-5.1.3-RELEASE-ubuntu16.04.tar.gz.sig
echo 'Importing keys'
wget -q -O - https://swift.org/keys/all-keys.asc | \
gpg --import -
gpg --keyserver hkp://pool.sks-keyservers.net --refresh-keys Swift
echo 'Extracting Swift 5.1.3 archive'
tar xzf swift-5.1.3-RELEASE-ubuntu16.04.tar.gz
echo 'Moving Swift to /usr/share/swift'
sudo mv swift-5.1.3-RELEASE-ubuntu18.04 /usr/share/swift
echo 'Performing environmental variables backup'
cp ~/.bashrc ./Backup
echo 'Adding new environmental variables'
export PATH=/usr/share/swift/usr/bin:"${PATH}"
source ~/.bashrc
echo 'Preparations'
cd ~
mkdir SwiftSetup
cd ~/SwiftSetup
mkdir Backup
echo 'cd to ~/SwiftSetup'
echo 'Fetching dependencies: clang, libicu-dev libssl-dev openssl'
sudo apt-get install clang libicu-dev libssl-dev openssl
echo 'Downloading Swift 5.1.3 release archive for Ubuntu18.04'
wget https://swift.org/builds/swift-5.1.3-release/ubuntu1804/swift-5.1.3-RELEASE/swift-5.1.3-RELEASE-ubuntu18.04.tar.gz
echo 'Downloading Swift 5.1.3 archive signature'
https://swift.org/builds/swift-5.1.3-release/ubuntu1804/swift-5.1.3-RELEASE/swift-5.1.3-RELEASE-ubuntu18.04.tar.gz.sig
echo 'Importing keys'
wget -q -O - https://swift.org/keys/all-keys.asc | \
gpg --import -
gpg --keyserver hkp://pool.sks-keyservers.net --refresh-keys Swift
echo 'Extracting Swift 5.1.3 archive'
tar xzf swift-5.1.3-RELEASE-ubuntu18.04.tar.gz
echo 'Moving Swift to /usr/share/swift'
sudo mv swift-5.1.3-RELEASE-ubuntu18.04 /usr/share/swift
echo 'Performing environmental variables backup'
cp ~/.bashrc ./Backup
echo 'Adding new environmental variables'
export PATH=/usr/share/swift/usr/bin:"${PATH}"
source ~/.bashrc
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment