From 5ecd37f763aeb89fcc4d9de1a9bb3de46e342212 Mon Sep 17 00:00:00 2001 From: yasu100 Date: Sat, 16 Jan 2016 00:07:37 +0900 Subject: [PATCH] Edit Ocaml module Use $OPAMROOT in modules/ocaml/init.zsh --- modules/ocaml/init.zsh | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/modules/ocaml/init.zsh b/modules/ocaml/init.zsh index b09c7eb2..1842422e 100644 --- a/modules/ocaml/init.zsh +++ b/modules/ocaml/init.zsh @@ -5,10 +5,15 @@ # Sebastian Wiesner # +# 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"