Install opam deps in build-infer script

Summary:
build-infer.sh script will create separate switch infer-4.02.3 and install all infer's deps there (including reason)
With this change users won't have to run opam install commands directly

Reviewed By: jvillard

Differential Revision: D3508897

fbshipit-source-id: 9f8e741
master
Andrzej Kotulski 9 years ago committed by Facebook Github Bot 6
parent b9fefe9d9b
commit 1420cabac5

@ -106,8 +106,25 @@ check_installed opam
opam init --no-setup --yes > /dev/null || \ opam init --no-setup --yes > /dev/null || \
opam init --no-setup --yes --comp=4.02.3 opam init --no-setup --yes --comp=4.02.3
OCAML_VERSION="4.02.3"
OPAM_SWITCH=infer-$OCAML_VERSION
if ! opam switch $OPAM_SWITCH >/dev/null 2>/dev/null; then
opam switch install $OPAM_SWITCH --alias-of $OCAML_VERSION
fi
eval $(SHELL=bash opam config env) eval $(SHELL=bash opam config env)
echo "installing infer dependencies... "
opam update
opam pin add --yes merlin 'https://github.com/the-lambda-church/merlin.git#reason-0.0.1'
opam pin add --yes merlin_extend 'https://github.com/let-def/merlin-extend.git#reason-0.0.1'
opam pin add --yes --no-action reason 'https://github.com/facebook/reason.git#0.0.6'
opam pin add --yes --no-action infer .
opam install --yes --deps-only infer
echo "preparing build... " echo "preparing build... "
if [ ! -f .release ]; then if [ ! -f .release ]; then
./autogen.sh > /dev/null ./autogen.sh > /dev/null

Loading…
Cancel
Save