Updated README with new cabal instructions

This commit is contained in:
Vidar Holen 2014-05-31 10:40:45 -07:00
parent 98b790f87a
commit cde364c97b
1 changed files with 11 additions and 4 deletions

View File

@ -16,7 +16,7 @@ The goals of ShellCheck are:
- To point out subtle caveats, corner cases and pitfalls, that may cause an - To point out subtle caveats, corner cases and pitfalls, that may cause an
advanced user's otherwise working script to fail under future circumstances. advanced user's otherwise working script to fail under future circumstances.
ShellCheck requires at least 1 GB of RAM to compile. Executables can be built with cabal. Tests currently still rely on a Makefile. ShellCheck is written in Haskell, and requires at least 1 GB of RAM to compile.
## Building with Cabal ## Building with Cabal
@ -57,10 +57,17 @@ Verify that your PATH is set up correctly:
$ which shellcheck $ which shellcheck
~/.cabal/bin/shellcheck ~/.cabal/bin/shellcheck
## Running tests
To run the unit test suite:
cabal configure --enable-tests
cabal build
cabal test
## Building with Make ## Building with Make
ShellCheck is written in Haskell, and requires GHC, Parsec3, JSON and ShellCheck requires GHC, Parsec3, JSON and Text.Regex.
Text.Regex. To run the unit tests, it also requires QuickCheck2.
On Fedora, these can be installed with: On Fedora, these can be installed with:
@ -72,7 +79,7 @@ On Ubuntu and similar, use:
apt-get install ghc libghc-parsec3-dev libghc-json-dev \ apt-get install ghc libghc-parsec3-dev libghc-json-dev \
libghc-regex-compat-dev libghc-quickcheck2-dev pandoc libghc-regex-compat-dev libghc-quickcheck2-dev pandoc
To build and run the tests, cd to the shellcheck source directory and: To build, cd to the shellcheck source directory and:
$ make $ make