I have a bash script that runs my package’s test suite and it currently looks like this:
cabal configure -f testing --builddir=$BUILDDIR
cabal build --builddir=$BUILDDIR --ghc-options="-Wall -Werror"
I only want to do that if not in a cabal-dev sand boxed environment otherwise I want to use cabal-dev instead. How would check for such a condition in a bash script?
If
cabal-devis used in the current project, there will be acabal-dev/directory in the root of that project that contains the sandbox files. You can therefore check for the existence of said directory to determine whethercabal-devis being used.