Last active
April 13, 2016 03:37
-
-
Save jpmartha/a6e8506981f05889f2328a10941c0a5c to your computer and use it in GitHub Desktop.
A Shell to download and install Swift Development Snapshots from Swift.org
This file contains 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
#!/usr/bin/env bash | |
DEVELOPMENT_SNAPSHOTS_PATH=https://swift.org/builds/development/xcode | |
DEVELOPMENT_SNAPSHOTS_PREFIX=swift-DEVELOPMENT-SNAPSHOT- | |
echo | |
if [ -z "$1" ]; then | |
echo "OVERVIEW: Download and install Swift Development Snapshots from Swift.org." | |
echo | |
echo "USAGE: get-swift-pkg [development-snapshots-name]" | |
echo | |
echo "Example: get-swift-pkg 2016-03-24-a" | |
echo | |
exit 1 | |
fi | |
DEVELOPMENT_SNAPSHOTS_NAME=$DEVELOPMENT_SNAPSHOTS_PREFIX"$1" | |
curl -O\# $DEVELOPMENT_SNAPSHOTS_PATH/$DEVELOPMENT_SNAPSHOTS_NAME/$DEVELOPMENT_SNAPSHOTS_NAME-osx.pkg | |
sudo installer -pkg $DEVELOPMENT_SNAPSHOTS_NAME-osx.pkg -target / | |
rm $DEVELOPMENT_SNAPSHOTS_NAME-osx.pkg | |
echo |
Author
jpmartha
commented
Apr 10, 2016
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment