Commit 5daba6e0 authored by Janno's avatar Janno

Add support for handling OPAM_SWITCh env var.

parent 5979cc63
......@@ -17,7 +17,12 @@ if test -d "$OPAMROOT"; then
else
echo_color "$BOLDYELLOW" "[prepare-opam] Creating new opam root"
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
fi
eval `opam conf env`
......
Markdown is supported
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