Skip to content

Instantly share code, notes, and snippets.

@hesselink
Created February 2, 2015 09:19
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 hesselink/885dd7d736578b9cde50 to your computer and use it in GitHub Desktop.
Save hesselink/885dd7d736578b9cde50 to your computer and use it in GitHub Desktop.
#!/bin/bash
VERSION=$1
pushd /Library/Frameworks/GHC.Framework/Versions/ > /dev/null
if [ "${VERSION}" = "" ]
then
echo Please specify version of GHC to switch to.
ls | grep -v Current
exit
fi
rm Current
ln -s $(ls | grep "^${VERSION}") Current
echo -n "Current:"
ls -l Current | cut -d ">" -f 2
popd > /dev/null
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment