https://gitlab.com/tezos/tezos
Raw File
Tip revision: 9cc2f24c7838123d92bd9b690ca9cd19e663b305 authored by Anne-Laure on 14 February 2024, 13:25:31 UTC
Apply 1 suggestion(s) to 1 file(s)
Tip revision: 9cc2f24
env.sh
#!/bin/sh

## How to use:
## eval $(scripts/env.sh)

## This script setups the shell environment, to be able to build and
## use the generated executables, including the bytecode version

set -e

script_dir="$(cd "$(dirname "$0")" && pwd -P)"
src_dir="$(dirname "$script_dir")"

## this ensures that opam env hook will not overwrite this script
echo "_opam_env_hook() { :; };"

add_ld_path() {
  echo "CAML_LD_LIBRARY_PATH=\"$src_dir/$1:\$CAML_LD_LIBRARY_PATH\""
}

opam env

## this list should contain all the known shared libraries on Tezos
## to update it the following command may be used
## $ make; find _build/default | grep -e "dll.*\.so\|dylib$"

add_ld_path "_build/default/src/lib_sapling"
back to top