@@ -1,27 +1,17 @@
1−#!/usr/bin/env sh
2−echo "==========================================="
3−echo "= Building and installing 'uuid-types'... ="
4−echo "==========================================="
1+#!/bin/sh
52
6−# We install here because "uuid" is going to need it.
7−(cd "uuid-types" && \
8− cabal configure --enable-tests && \
9− cabal build && \
10− cabal test && \
11− cabal install) || exit 1
3+cd $1
124
13−echo "========================================="
14−echo "= Installing dependencies for 'uuid'... ="
15−echo "========================================="
16−
17−(cd "uuid" && \
18− cabal install --dependencies-only --enable-tests) || exit 1
19−
20−echo "======================"
21−echo "= Building 'uuid'... ="
22−echo "======================"
23−
24−(cd "uuid" && \
25− cabal configure --enable-tests && \
26− cabal build && \
27− cabal test) || exit 1
5+cabal configure --enable-tests --enable-benchmarks -v2
6+cabal build
7+cabal test
8+cabal check
9+cabal sdist
10+export SRC_TGZ=$(cabal info . | awk '{print $2 ".tar.gz";exit}') ;
11+cd dist/;
12+if [ -f "$SRC_TGZ" ]; then
13+ cabal install --force-reinstalls "$SRC_TGZ";
14+else
15+ echo "expected '$SRC_TGZ' not found";
16+ exit 1;
17+fi