2018-07-05 01:08:20 +04:00
|
|
|
#! /bin/sh
|
|
|
|
|
|
|
|
script_dir="$(cd "$(dirname "$0")" && echo "$(pwd -P)/")"
|
|
|
|
src_dir="$(dirname "$script_dir")"
|
|
|
|
|
|
|
|
. "$script_dir"/version.sh
|
|
|
|
|
|
|
|
. "$script_dir"/opam-pin.sh
|
|
|
|
|
|
|
|
echo "## Checking installed dependencies..."
|
|
|
|
echo
|
|
|
|
|
|
|
|
if ! opam install $packages --deps-only --with-test --show-actions | grep "Nothing to do." > /dev/null 2>&1 ; then
|
2018-07-06 19:12:05 +04:00
|
|
|
echo
|
|
|
|
echo 'Failure! Missing actions:'
|
|
|
|
echo
|
2018-07-05 01:08:20 +04:00
|
|
|
opam install $packages --deps-only --with-test --show-actions
|
2018-07-06 19:12:05 +04:00
|
|
|
echo
|
|
|
|
echo 'Running `./scripts/update_opam_repo.sh`'
|
|
|
|
echo
|
|
|
|
./scripts/update_opam_repo.sh
|
|
|
|
echo
|
|
|
|
echo 'Result:'
|
|
|
|
echo
|
|
|
|
cat opam_repo.patch
|
|
|
|
echo
|
|
|
|
echo 'Failed! Please run: `./scripts/update_opam_repo.sh` and follow the instructions.'
|
|
|
|
echo
|
2018-07-05 01:08:20 +04:00
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
|
|
|
echo "Ok."
|