2012-05-12 12:58:47 +02:00
|
|
|
#
|
|
|
|
# Enables local Haskell package installation.
|
|
|
|
#
|
|
|
|
# Authors:
|
|
|
|
# Sebastian Wiesner <lunaryorn@googlemail.com>
|
|
|
|
#
|
|
|
|
|
2012-07-23 21:00:44 +02:00
|
|
|
# Return if requirements are not found.
|
|
|
|
if (( ! $+commands[ghc] )); then
|
|
|
|
return 1
|
|
|
|
fi
|
|
|
|
|
2012-05-12 12:58:47 +02:00
|
|
|
# Prepend Cabal per user directories to PATH/MANPATH.
|
2012-10-11 14:23:41 +02:00
|
|
|
if [[ "$OSTYPE" == darwin* && -d $HOME/Library/Haskell ]]; then
|
2012-05-12 12:58:47 +02:00
|
|
|
path=($HOME/Library/Haskell/bin(/N) $path)
|
|
|
|
manpath=($HOME/Library/Haskell/man(/N) $manpath)
|
|
|
|
else
|
|
|
|
path=($HOME/.cabal/bin(/N) $path)
|
2012-09-20 14:34:22 +02:00
|
|
|
manpath=($HOME/.cabal/man(/N) $manpath)
|
2012-05-12 12:58:47 +02:00
|
|
|
fi
|