Skip to content

Instantly share code, notes, and snippets.

View ddunbar's full-sized avatar

Daniel Dunbar ddunbar

View GitHub Profile
@ddunbar
ddunbar / update-swift-dev
Created June 2, 2016 17:35
This is the script I currently use on OS X to get a working "swift-dev.xctoolchain" out of a built Swift. It isn't designed to work for anyone but me, but it should be easy to adapt. I always run this after every build, and then use `TOOLCHAINS=swift-dev swift build` (etc) to use the development compiler.
#!/bin/sh
set -e
if [ -z "${CONFIGURATION}" ]; then
CONFIGURATION=debug
fi
# Create the development toolchain.
rm -rf ~/public/swift-project/build/Ninja-ReleaseAssert/swift-dev.xctoolchain
$ cat ~/bin/status
#!/bin/sh
if [ $# -lt 2 ]; then
echo "Usage: $(basename $0) <exit-code> <name ...>"
echo
echo "This script is intended to be used along with a shell alias"
echo "such as:"
echo " alias status='status $?'"
echo "which will automatically add the last exit code."