swh:1:snp:9c27352633c4639a943e316050a7b904f57900e2
Raw File
Tip revision: 6befa0204a1c084e66af75ddab2835a81b12139e authored by Mathias Bourgoin on 30 September 2019, 15:38:26 UTC
Mempool: sort valid operation by date in to_mempool
Tip revision: 6befa02
opam-check.sh
#! /bin/sh

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

. "$script_dir"/version.sh

opams=$(find "$src_dir/vendors" "$src_dir/src" -name \*.opam -print)

echo "## Checking installed dependencies..."
echo

if ! opam install $opams --deps-only --with-test --show-actions | grep "Nothing to do." > /dev/null 2>&1 ; then
    echo
    echo 'Failure! Missing actions:'
    echo
    opam install $opams --deps-only --with-test --show-actions
    echo
    echo 'Failed! Please read the doc in `./scripts/update_opam_repo.sh` and act accordingly.'
    echo
    exit 1
fi

echo '## Running `./scripts/update_opam_repo.sh`'
echo
./scripts/update_opam_repo.sh

if [ -n "$(cat opam_repo.patch)" ] ; then

    echo "##################################################"
    cat opam_repo.patch
    echo "##################################################"

    echo 'Failed! The variables `opam_repository_tag` and `full_opam_repository_tag` are not synchronized. Please read the doc in `./scripts/update_opam_repo.sh` and act accordingly.'
    echo
    exit 1
fi

echo "Ok."
back to top