Last active
April 12, 2016 14:08
-
-
Save MichalPekala/afdc3e76c213d0f497a8 to your computer and use it in GitHub Desktop.
Swift Vagrant file
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Vagrant.configure(2) do |config| | |
config.vm.box = "https://cloud-images.ubuntu.com/vagrant/trusty/current/trusty-server-cloudimg-amd64-vagrant-disk1.box" | |
config.vm.hostname = "swift-developer" | |
config.vm.provision "shell", inline: <<-SHELL | |
sudo apt-get install clang-3.6 libicu-dev -y | |
mkdir /opt/swift/ | |
SWIFT_VERSION="2.2-RELEASE" | |
SWIFT_PLATFORM="ubuntu14.04" | |
wget -nv https://swift.org/builds/swift-2.2-release/$(echo "$SWIFT_PLATFORM" | tr -d .)/swift-$SWIFT_VERSION/swift-$SWIFT_VERSION-$SWIFT_PLATFORM.tar.gz | |
wget -nv https://swift.org/builds/swift-2.2-release/$(echo "$SWIFT_PLATFORM" | tr -d .)/swift-$SWIFT_VERSION/swift-$SWIFT_VERSION-$SWIFT_PLATFORM.tar.gz.sig | |
wget -q -O - https://swift.org/keys/all-keys.asc | gpg --import - | |
gpg --keyserver hkp://pool.sks-keyservers.net --refresh-keys Swift | |
gpg --verify swift-$SWIFT_VERSION-$SWIFT_PLATFORM.tar.gz.sig | |
sudo tar xvzf swift-$SWIFT_VERSION-$SWIFT_PLATFORM.tar.gz --directory /opt/swift/ --strip-components=1 | |
echo "export PATH=/opt/swift/usr/bin:\"${PATH}\"" >> .profile | |
echo "Swift has successfully installed on Linux" | |
SHELL | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment