ligo/scripts/install_build_deps.sh

31 lines
804 B
Bash
Raw Normal View History

#! /bin/sh
2016-09-08 21:13:10 +04:00
script_dir="$(cd "$(dirname "$0")" && echo "$(pwd -P)/")"
src_dir="$(dirname "$script_dir")"
. "$script_dir"/version.sh
opam repository set-url tezos --dont-select $opam_repository || \
opam repository add tezos --dont-select $opam_repository > /dev/null 2>&1
2019-01-22 21:07:13 +04:00
opam update --repositories --development
if [ ! -d "$src_dir/_opam" ] ; then
opam switch create "$src_dir" --repositories=tezos ocaml-base-compiler.$ocaml_version
fi
if [ ! -d "$src_dir/_opam" ] ; then
echo "Failed to create the opam switch"
exit 1
fi
eval $(opam env --shell=sh)
if [ "$(ocaml -vnum)" != "$ocaml_version" ]; then
opam install --unlock-base ocaml-base-compiler.$ocaml_version
2016-09-08 21:13:10 +04:00
fi
2018-09-19 21:33:25 +04:00
opam list --installed opam-depext || opam --yes install opam-depext
2016-09-08 21:13:10 +04:00
2018-06-27 14:58:06 +04:00
"$script_dir"/install_build_deps.raw.sh