Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- # put the binary symlinks here
- HASKELL_BIN=$HOME/Haskell/bin
- # build the packages here
- HASKELL_SANDBOXES=$HOME/Haskell/bin/sandboxes
- # command line argumennts to cabal
- flags=""
- #libraries to install
- libs=""
- # collect all the commmand line arguments and libraries
- for i in $@
- do
- if [ ${i:0:1} = '-' ]
- then
- flags+=" $i"
- else
- libs+=" $i"
- fi
- done
- for i in $libs
- do
- SBOX=$HASKELL_SANDBOXES/${i}
- echo "Installing $i in sandbox at $SBOX"
- mkdir $SBOX && cd $SBOX
- cabal sandbox init
- cabal install $flags $i
- cd $HASKELL_BIN
- ln -s $SBOX/.cabal-sandbox/bin/${i} $i
- echo "$i installed and registered at $HASKELL_BIN/${i}"
- done
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement