Created
March 5, 2013 13:00
-
-
Save andy-morris/5090155 to your computer and use it in GitHub Desktop.
Cabal + stow = magic
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env zsh | |
cd $STOW_DIR | |
if [[ -a $1 ]]; then | |
echo "$1 already exists in stowland!" | |
exit 1 | |
fi | |
mkdir $1 | |
cd $1 | |
mkdir links | |
ghc-pkg init ghc | |
cabal install --one-shot --prefix=$PWD --package-db=$PWD/ghc \ | |
--symlink-bindir=$PWD/links --disable-tests --disable-executable-dynamic \ | |
--disable-library-profiling --disable-executable-profiling \ | |
--disable-documentation $@ | |
rm -rf links ghc doc lib | |
stow $1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment