Skip to content

Instantly share code, notes, and snippets.

@benkolera
Last active August 29, 2015 14:08
Show Gist options
  • Select an option

  • Save benkolera/7fbf897c9ae45e21fed9 to your computer and use it in GitHub Desktop.

Select an option

Save benkolera/7fbf897c9ae45e21fed9 to your computer and use it in GitHub Desktop.
Installs a haskell lib into a sandbox and
NAME=$1
SANDBOX_BASE=$HOME/opt/haskell
SANDBOX_CONF=$SANDBOX_BASE/$NAME.sandbox.config
SANDBOX_DIR=$SANDBOX_BASE/$NAME
rm -fr $SANDBOX_DIR
rm -fr $SANDBOX_CONF
cabal --sandbox-config-file $SANDBOX_CONF sandbox init --sandbox $SANDBOX_DIR
cabal --sandbox-config-file $SANDBOX_CONF install $NAME
ln -s $SANDBOX_DIR/bin/* $HOME/bin/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment