Skip to content

Instantly share code, notes, and snippets.

@jpmartha
Last active April 13, 2016 03:37
Show Gist options
  • Save jpmartha/a6e8506981f05889f2328a10941c0a5c to your computer and use it in GitHub Desktop.
Save jpmartha/a6e8506981f05889f2328a10941c0a5c to your computer and use it in GitHub Desktop.
A Shell to download and install Swift Development Snapshots from Swift.org
#!/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
@jpmartha
Copy link
Author

2016-04-11 20 58 15

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment