[Haskell-cafe] OpenSUSE 11.2

Andrew Coppin andrewcoppin at btinternet.com
Sun Feb 28 14:07:28 EST 2010


David Virebayre wrote:
> On Sun, Feb 28, 2010 at 6:30 PM, Andrew Coppin 
> <andrewcoppin at btinternet.com <mailto:andrewcoppin at 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...]



More information about the Haskell-Cafe mailing list