ligo/vendors/tezos-modded/scripts/opam-pin.sh

31 lines
588 B
Bash
Raw Normal View History

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