Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

executable file 28 lines (21 sloc) 0.698 kB
#! /bin/bash
set -eu
APT="sudo apt-get -q -y"
CABAL_INSTALL_DEPS="cabal install --only-dependencies --force-reinstall"
$APT update
$APT install dctrl-tools
# Find potential system packages to satisfy cabal dependencies
deps()
{
local M='^\([^ ]\+\)-[0-9.]\+ (.*$'
local G=' -o ( -FPackage -X libghc-\L\1\E-dev )'
local E="$($CABAL_INSTALL_DEPS "$@" --dry-run -v 2> /dev/null \
| sed -ne "s/$M/$G/p" | sort -u)"
grep-aptavail -n -sPackage \( -FNone -X None \) $E | sort -u
}
$APT install $(deps "$@") libghc-quickcheck2-dev # QuickCheck is special
$CABAL_INSTALL_DEPS "$@" # Install the rest via Hackage
if ! $APT install hlint ; then
$APT install $(deps hlint)
cabal install hlint
fi
Jump to Line
Something went wrong with that request. Please try again.