Skip to content

Instantly share code, notes, and snippets.

@fujimura
Last active August 29, 2015 14:12
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 fujimura/762321a101e53ae6901b to your computer and use it in GitHub Desktop.
Save fujimura/762321a101e53ae6901b to your computer and use it in GitHub Desktop.
cabal-sandbox-user-install.sh
#! /bin/sh
# Original idea came from http://maoe.hatenadiary.jp/entry/2014/12/25/064900
hash $1 2>/dev/null || {
cabal get $1
r=`ls | grep $1 | head -1`
cd $r
cabal sandbox init
cabal install -j --bindir ~/.cabal/bin --datadir ~/.cabal/share
rm -rfv $r
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment