Revision ffcfaa146f8f40f47c871a237150450eca68bc13 authored by Marcin Pastudzki on 28 June 2022, 09:45:08 UTC, committed by Fedor Sheremetyev on 29 June 2022, 10:56:23 UTC
1 parent 5ab28d8
Raw File
install-opam-scratch.sh
#!/bin/sh
# shellcheck source=/dev/null
# for not checking the existence of sourced file $HOME/.cargo/env
# shellcheck disable=SC2154
# for undefined variable in: opam switch create for_tezos $ocaml_version
# shellcheck disable=SC2086
# for omitting quotes in: opam switch create for_tezos $ocaml_version
# shellcheck disable=SC2046
# for omitting quotes in: eval $(opam env)

set -e
set -x
apt-get update
apt-get -y install make m4 gcc patch unzip bubblewrap wget
# apt-get install -y curl
# sh <(curl -sL https://raw.githubusercontent.com/ocaml/opam/master/shell/install.sh)

apt-get -y install software-properties-common
# [install opam]
add-apt-repository ppa:avsm/ppa
apt-get update
apt-get -y install opam
# [opam init]
opam init --bare -y
export OPAMYES=true
export OPAMSOLVERTIMEOUT=1200
# [install ocaml compiler]
wget -O latest-release:version.sh https://gitlab.com/tezos/tezos/raw/latest-release/scripts/version.sh
. ./latest-release:version.sh
opam switch create for_tezos $ocaml_version
eval $(opam env)
# [get system dependencies]
# depext handling is done directly by opam 2.1 and later
opam depext tezos
# [install tezos]
opam install -y tezos
# [test executables]
tezos-client --version
back to top