2017-12-06 22:51:49 +04:00
|
|
|
#! /bin/sh
|
|
|
|
|
|
|
|
set -e
|
|
|
|
|
|
|
|
script_dir="$(cd "$(dirname "$0")" && echo "$(pwd -P)/")"
|
|
|
|
src_dir="$(dirname "$script_dir")"
|
|
|
|
|
|
|
|
export OPAMYES=yes
|
|
|
|
|
2018-07-05 01:08:20 +04:00
|
|
|
echo
|
|
|
|
echo "## Pinning tezos packages..."
|
|
|
|
|
2018-05-25 11:56:14 +04:00
|
|
|
opams=$(find "$src_dir/vendors" "$src_dir/src" -name \*.opam -print)
|
2018-01-27 17:54:12 +04:00
|
|
|
|
2017-12-06 22:51:49 +04:00
|
|
|
packages=
|
|
|
|
for opam in $opams; do
|
|
|
|
dir=$(dirname $opam)
|
|
|
|
file=$(basename $opam)
|
|
|
|
package=${file%.opam}
|
|
|
|
packages="$packages $package"
|
2018-07-05 01:08:20 +04:00
|
|
|
opam pin add --no-action $package $dir > /dev/null 2>&1
|
2017-12-06 22:51:49 +04:00
|
|
|
done
|
|
|
|
|
2018-05-25 11:56:14 +04:00
|
|
|
packages=$(opam list --short --sort --pinned $packages)
|
2017-12-06 22:51:54 +04:00
|
|
|
|
2017-12-06 22:52:00 +04:00
|
|
|
echo
|
2018-07-05 01:08:20 +04:00
|
|
|
echo "## Pinned packages:"
|
|
|
|
echo
|
2017-12-06 22:52:00 +04:00
|
|
|
echo "$packages" | sed 's/^/ /'
|
|
|
|
echo
|