David Virebayre wrote:
On Sun, Feb 28, 2010 at 6:30 PM, Andrew Coppin <andrewcop...@btinternet.com <mailto:andrewcop...@btinternet.com>> wrote:

    Daniel Fischer wrote:

        if [ -z `/bin/echo ${PATH} | /usr/bin/grep cabal` ]

        then
           export PATH="/home/andrew/.cabal/bin:$PATH"
        fi

        in your .bashrc

    Uh... what?


that snippet supposes you have cabal installed in your home directory under the directory ".cabal". The binary file would be in the bin subdirectory of ".cabal" Names that start with a . are hidden files/directories on linux, by the way. So the first line checks if you have "cabal" in your path list. If not, on the 3rd line it supposes your home directory is /home/andrew and adds the cabal binary directory to your path list.

Oh, right. So it's checking whether it's already in the search path before adding it. I would have just added it. ;-) [And by the looks of it, I would have got even that wrong...]

_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to