Skip to content

Instantly share code, notes, and snippets.

@ikesyo
Forked from kylef/swiftenv-install.sh
Last active July 10, 2016 07:01
Show Gist options
  • Save ikesyo/4c30b58e4abb365890e74bcee1525f3a to your computer and use it in GitHub Desktop.
Save ikesyo/4c30b58e4abb365890e74bcee1525f3a to your computer and use it in GitHub Desktop.
#!/usr/bin/env bash
# Automatically installs swiftenv and run's swiftenv install.
# This script was designed for usage in CI systems.
git clone -b support-installing-previews --depth 1 https://github.com/ikesyo/swiftenv.git ~/.swiftenv
export SWIFTENV_ROOT="$HOME/.swiftenv"
export PATH="$SWIFTENV_ROOT/bin:$SWIFTENV_ROOT/shims:$PATH"
if [ -f ".swift-version" ] || [ -n "$SWIFT_VERSION" ]; then
swiftenv install -s
else
swiftenv rehash
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment