From 6e121bfafc24c7036b4993b1e514249842a02165 Mon Sep 17 00:00:00 2001
From: John MacFarlane <jgm@berkeley.edu>
Date: Sun, 5 Jul 2015 10:42:44 -0700
Subject: [PATCH] Travis: only do sdist with cabal != 1.16.

---
 .travis.yml | 11 +++++------
 1 file changed, 5 insertions(+), 6 deletions(-)

diff --git a/.travis.yml b/.travis.yml
index 63cbcd20d..9a67ac32b 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -25,15 +25,14 @@ install:
  - cabal-$CABALVER update
 # - git clone https://github.com/jgm/pandoc-types && cd pandoc-types && cabal-1.18 install && cd ..
  - cabal-$CABALVER install $JOPTS --only-dependencies --enable-tests
-# hsb2hs is needed for -fembed_data_files, and is needed for sdist on
-# older cabal versions (1.16):
- - cabal-$CABALVER install hsb2hs
 
 # Here starts the actual work to be performed for the package under test; any command which exits with a non-zero exit code causes the build to fail.
 script:
- - cabal-$CABALVER configure --enable-tests # needed for sdist with ghc 7.4.2/cabal 1.16
- - cabal-$CABALVER sdist --output-directory=build
- - cd build
+ - |
+   if [ "${CABALVER}" != "1.16" ]; then
+      cabal-$CABALVER sdist --output-directory=build
+      cd build
+   fi
  - cabal-$CABALVER configure --enable-tests -v2  # -v2 provides useful information for debugging
  - cabal-$CABALVER build $JOPTS --ghc-options=$GHCOPTS # this builds all libraries and executables (including tests/benchmarks)
  - cabal-$CABALVER test