mirror of
https://github.com/dcarrillo/prezto.git
synced 2024-10-07 06:48:48 +00:00
f4ca9ebfc9
Add the following functions: - is-darwin - is-linux - is-bsd - is-cygwin And apply them everywhere I found code doing that what these functions do.
19 lines
390 B
Bash
19 lines
390 B
Bash
#
|
|
# Enables local Haskell package installation.
|
|
#
|
|
# Authors:
|
|
# Sebastian Wiesner <lunaryorn@googlemail.com>
|
|
#
|
|
|
|
# Return if requirements are not found.
|
|
if (( ! $+commands[ghc] )); then
|
|
return 1
|
|
fi
|
|
|
|
# Prepend Cabal per user directories to PATH.
|
|
if is-darwin && [[ -d $HOME/Library/Haskell ]]; then
|
|
path=($HOME/Library/Haskell/bin(/N) $path)
|
|
else
|
|
path=($HOME/.cabal/bin(/N) $path)
|
|
fi
|