commit | 4bd902c5c47aab81045f3071e93a9344e3562d6e | [log] [tgz] |
---|---|---|
author | Vidar Holen <spam@vidarholen.net> | Sat May 03 17:13:36 2014 |
committer | Vidar Holen <spam@vidarholen.net> | Sat May 03 17:13:36 2014 |
tree | 9b9b015ccbec305f60e2d42567c721322bd1a3ab | |
parent | 033ce6d941655b1995971f03c8796f40c79d37b4 [diff] |
Suggested updating cabal-install in the readme
Copyright 2012-2014, Vidar ‘koala_man’ Holen Licensed under the GNU Affero General Public License, v3
The goals of ShellCheck are:
To point out and clarify typical beginner's syntax issues, that causes a shell to give cryptic error messages.
To point out and clarify typical intermediate level semantic problems, that causes a shell to behave strangely and counter-intuitively.
To point out subtle caveats, corner cases and pitfalls, that may cause an 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.
Make sure cabal is installed. On Debian based distros:
apt-get install cabal-install
On Fedora:
yum install cabal-install
On Mac OS X with homebrew (http://brew.sh/):
brew install cabal-install
On Mac OS X with MacPorts (http://www.macports.org/):
port install hs-cabal-install
Let cabal update itself, in case your distro version is outdated:
$ cabal update $ cabal install cabal-install
With cabal installed, cd to the ShellCheck source directory and:
$ cabal install
This will install ShellCheck to your ~/.cabal/bin directory.
Add the directory to your PATH (for bash, add this to your ~/.bashrc file):
export PATH=$HOME/.cabal/bin:$PATH
Verify that your PATH is set up correctly:
$ which shellcheck ~/.cabal/bin/shellcheck
ShellCheck is written in Haskell, and requires GHC, Parsec3, JSON and Text.Regex. To run the unit tests, it also requires QuickCheck2.
On Fedora, these can be installed with:
yum install ghc ghc-parsec-devel ghc-QuickCheck-devel \ ghc-json-devel ghc-regex-compat-devel pandoc
On Ubuntu and similar, use:
apt-get install ghc libghc-parsec3-dev libghc-json-dev \ libghc-regex-compat-dev libghc-quickcheck2-dev pandoc
To build and run the tests, cd to the shellcheck source directory and:
$ make
Happy ShellChecking!