https://gitlab.com/tezos/tezos
Raw File
Tip revision: c7e98ddbb00d2125d9ea09e7b6c38a2b1e85e6fd authored by Pierrick Couderc on 16 September 2022, 12:12:26 UTC
Draft: remove refs in local var
Tip revision: c7e98dd
build_and_install_static_binaries.sh
#!/usr/bin/env sh

# Used in the CI to build and install the static binaries.

set -eu

if [ $# -ne 1 ]; then
    echo "usage: $0 DESTDIR"
    exit 1
fi

tmp_dir=$(mktemp -dt tezos_static_install.XXXXXXXX)
cleanup () {
    set +e
    echo Cleaning up...
    rm -rf "$tmp_dir"
}
trap cleanup EXIT INT

# shellcheck disable=SC2046
dune build   --profile static $(xargs -I {} echo {}.install < script-inputs/static-packages)
# shellcheck disable=SC2046
dune install --profile static --prefix "$tmp_dir" $(cat script-inputs/static-packages)
mv "$tmp_dir/bin" "$1"
back to top