Skip to content

Instantly share code, notes, and snippets.

@czechboy0
Forked from kylef/swiftenv-install.sh
Created September 30, 2016 11:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save czechboy0/4f8d8a46bd101c914835f607a3561234 to your computer and use it in GitHub Desktop.
Save czechboy0/4f8d8a46bd101c914835f607a3561234 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 --depth 1 https://github.com/kylef/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