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")"
|
|
|
|
|
|
|
|
opams=$(find "$src_dir" -name \*.opam)
|
|
|
|
packages=
|
|
|
|
|
|
|
|
for opam in $opams; do
|
|
|
|
dir=$(dirname $opam)
|
|
|
|
file=$(basename $opam)
|
|
|
|
package=${file%.opam}
|
|
|
|
packages="$packages $package"
|
|
|
|
done
|
|
|
|
|
2018-05-25 11:56:14 +04:00
|
|
|
installed=$(opam list --short --installed --pinned $packages)
|
2017-12-06 22:51:49 +04:00
|
|
|
|
|
|
|
opam remove $installed
|