Edit Ocaml module
Use $OPAMROOT in modules/ocaml/init.zsh
This commit is contained in:
parent
7227c4f0be
commit
5ecd37f763
1 changed files with 7 additions and 2 deletions
|
@ -5,10 +5,15 @@
|
|||
# Sebastian Wiesner <lunaryorn@gmail.com>
|
||||
#
|
||||
|
||||
# Set $OPAMROOT
|
||||
if [[ -z "$OPAMROOT" ]]; then
|
||||
export OPAMROOT="${HOME}/.opam"
|
||||
fi
|
||||
|
||||
# Return if requirements are not found.
|
||||
if [[ ! -f "$HOME/.opam/opam-init/init.zsh" ]]; then
|
||||
if [[ ! -f "$OPAMROOT/opam-init/init.zsh" ]]; then
|
||||
return 1
|
||||
fi
|
||||
|
||||
# Initialize OPAM.
|
||||
source "$HOME/.opam/opam-init/init.zsh"
|
||||
source "$OPAMROOT/opam-init/init.zsh"
|
||||
|
|
Loading…
Add table
Reference in a new issue