Commit 5daba6e0 authored by Janno's avatar Janno
Browse files

Add support for handling OPAM_SWITCh env var.

parent 5979cc63
...@@ -17,7 +17,12 @@ if test -d "$OPAMROOT"; then ...@@ -17,7 +17,12 @@ if test -d "$OPAMROOT"; then
else else
echo_color "$BOLDYELLOW" "[prepare-opam] Creating new opam root" echo_color "$BOLDYELLOW" "[prepare-opam] Creating new opam root"
mkdir "$OPAMROOT" mkdir "$OPAMROOT"
opam init --no-setup --disable-sandboxing -y if [[ -z "${OPAM_SWITCH}" ]]; then
INITIAL_SWITCH="";
else
INITIAL_SWITCH="-c ${OPAM_SWITCH}";
fi;
opam init --no-setup --disable-sandboxing -y "${INITIAL_SWITCH}"
FRESH_OPAM=yes FRESH_OPAM=yes
fi fi
eval `opam conf env` eval `opam conf env`
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment