darcs-reviewed mirror — http://darcs.net
Update contrib/install-deps.sh.
cabal install "$@" -fdeps-only 2>&1 > /dev/null | tee install-deps.log
grep -F -A 10000 "At least the following dependencies are missing" install-deps.log | \
grep -F -B 10000 "Error: some packages failed to install" | tail -n +2 | head -n -1 | \
while read -d, line || test -n "$line"; do
cabal install "$@" "$line"
done
rm install-deps.log
if cabal help install | grep -q only-dependencies; then
cabal install "$@" --only-dependencies
else
cabal install "$@" -f-library -f-executable -f-test 2>&1 > /dev/null | tee install-deps.log
grep -F -A 10000 "At least the following dependencies are missing" install-deps.log | \
grep -F -B 10000 "Error: some packages failed to install" | tail -n +2 | head -n -1 | \
while read -d, line || test -n "$line"; do
cabal install "$@" "$line"
done
rm install-deps.log
fi
flag deps-only
default: False
description: A cunning trick to have cabal install build dependencies
if (!flag(curl) && !flag(http)) || flag(deps-only)
if (!flag(curl) && !flag(http))
if (!flag(curl) && !flag(http)) || flag(deps-only)
if (!flag(curl) && !flag(http))