ligo/scripts/opam-pin.sh

40 lines
881 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
2018-01-27 17:54:12 +04:00
### Temporary HACK
## Should be in sync with `opam-unpin.sh`
2018-01-18 19:18:55 +04:00
opam pin add --no-action leveldb git://github.com/chambart/ocaml-leveldb.git#update_4.06
2018-01-27 17:54:12 +04:00
opam pin add --no-action --dev-repo ocplib-json-typed
## Unpin package we used to pin...
opam pin remove --no-action ocp-ocamlres
opam pin remove --no-action ocplib-resto
opam pin remove --no-action sodium
2018-01-27 17:54:12 +04:00
### End of temporary HACK
opams=$(find "$src_dir" -name \*.opam -print)
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
done
packages=$(opam list --short --all --sort $packages)
echo
echo "Pinned packages:"
echo "$packages" | sed 's/^/ /'
echo