Advertisement
Guest User

Untitled

a guest
Apr 26th, 2015
213
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.69 KB | None | 0 0
  1. #!/bin/bash
  2.  
  3. # put the binary symlinks here
  4. HASKELL_BIN=$HOME/Haskell/bin
  5. # build the packages here
  6. HASKELL_SANDBOXES=$HOME/Haskell/bin/sandboxes
  7. # command line argumennts to cabal
  8. flags=""
  9. #libraries to install
  10. libs=""
  11.  
  12. # collect all the commmand line arguments and libraries
  13. for i in $@
  14. do
  15. if [ ${i:0:1} = '-' ]
  16. then
  17. flags+=" $i"
  18. else
  19. libs+=" $i"
  20. fi
  21. done
  22.  
  23.  
  24. for i in $libs
  25. do
  26. SBOX=$HASKELL_SANDBOXES/${i}
  27. echo "Installing $i in sandbox at $SBOX"
  28. mkdir $SBOX && cd $SBOX
  29. cabal sandbox init
  30. cabal install $flags $i
  31. cd $HASKELL_BIN
  32. ln -s $SBOX/.cabal-sandbox/bin/${i} $i
  33. echo "$i installed and registered at $HASKELL_BIN/${i}"
  34. done
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement