Skip to content
Snippets Groups Projects

update build system and README

Merged Ralf Jung requested to merge ralf/buildsys into master
Files
5
+ 7
2
@@ -4,18 +4,23 @@ set -e
@@ -4,18 +4,23 @@ set -e
## Usage:
## Usage:
## ./opam-pins.sh < opam.pins
## ./opam-pins.sh < opam.pins
 
if ! which curl >/dev/null; then
 
echo "opam-pins needs curl. Please install curl and try again."
 
exit 1
 
fi
 
# Process stdin
# Process stdin
while read PACKAGE URL HASH; do
while read PACKAGE URL HASH; do
if echo "$URL" | egrep '^https://gitlab\.mpi-sws\.org' > /dev/null; then
if echo "$URL" | egrep '^https://gitlab\.mpi-sws\.org' > /dev/null; then
echo "[opam-pins] Recursing into $URL"
echo "[opam-pins] Recursing into $URL"
# an MPI URL -- try doing recursive pin processing
# an MPI URL -- try doing recursive pin processing
curl -f "$URL/raw/$HASH" 2> /dev/null | "$0"
curl -f "$URL/raw/$HASH/opam.pins" 2>/dev/null | "$0"
fi
fi
if opam pin list | fgrep "$PACKAGE.dev.$HASH " > /dev/null; then
if opam pin list | fgrep "$PACKAGE.dev.$HASH " > /dev/null; then
echo "[opam-pins] $PACKAGE already at commit $HASH"
echo "[opam-pins] $PACKAGE already at commit $HASH"
else
else
echo "[opam-pins] Applying pin: $PACKAGE -> $URL#$HASH"
echo "[opam-pins] Applying pin: $PACKAGE -> $URL#$HASH"
opam pin add "$PACKAGE.dev.$HASH" "$URL#$HASH" -k git -y -n
opam pin add "$PACKAGE.dev.$HASH" "$URL#$HASH" -k git -y -n
 
echo
fi
fi
echo
done
done
Loading