swift3.0 - ml-archive/homestead GitHub Wiki
Consult Operations before running!
IMPORTANT!! .. This guide only works if you already have homestead, if you don't contact the operations team
vim install_swift.sh
Add the following to the file:
(Type <esc> i
to insert)
#!/bin/bash
SWIFT_BRANCH=swift-3.0-release
SWIFT_BRANCH2=swift-3.0-RELEASE
SWIFT_PLATFORM=ubuntu14.04
# Install related packages and set LLVM 3.6 as the compiler
apt-get update && \
apt-get install -y build-essential wget clang-3.6 libedit-dev python2.7 python2.7-dev libicu52 rsync libxml2 git libmysqlclient-dev curl && \
update-alternatives --install /usr/bin/clang clang /usr/bin/clang-3.6 100 && \
update-alternatives --install /usr/bin/clang++ clang++ /usr/bin/clang++-3.6 100 && \
apt-get clean
# Install Swift keys
wget -q -O - https://swift.org/keys/all-keys.asc | gpg --import - && \
gpg --keyserver hkp://pool.sks-keyservers.net --refresh-keys Swift
# Install Swift Ubuntu 14.04 Release
SWIFT_ARCHIVE_NAME=$SWIFT_BRANCH2-$SWIFT_PLATFORM && \
SWIFT_URL=https://swift.org/builds/$SWIFT_BRANCH/$(echo "$SWIFT_PLATFORM" | tr -d .)/$SWIFT_BRANCH2/$SWIFT_ARCHIVE_NAME.tar.gz && \
wget $SWIFT_URL && \
wget $SWIFT_URL.sig && \
gpg --verify $SWIFT_ARCHIVE_NAME.tar.gz.sig && \
tar -xvzf $SWIFT_ARCHIVE_NAME.tar.gz --directory / --strip-components=1 && \
rm -r ./$SWIFT_ARCHIVE_NAME*
# Set Swift Path
PATH=/usr/bin:$PATH
# Install Vapor toolbox
/usr/bin/curl -sL toolbox.vapor.sh | bash
(Type <esc> :wq
to write and exit)
Run script:
sudo chmod u+x install_swift.sh && sudo ./install_swift.sh