[Haskell-cafe] How to add ENV variable in runhaskell shell script

Brandon S. Allbery KF8NH allbery at ece.cmu.edu
Sun Jan 13 23:21:26 EST 2008


On Jan 13, 2008, at 23:16 , Liyang HU wrote:

> On 1/14/08, Steve Lihn <stevelihn at gmail.com> wrote:
>> In perl scripts (unix), one can do
>> #!/usr/local/bin/perl
>> BEGIN { $ENV{LD_LIBRARY_PATH} = ...; }
>
> I've not tested this (what a great line to start a post...), but see
> if this works for you:
>
>     #! /usr/bin/env LD_LIBRARY_PATH=/path/to/libs runhaskell

Will probably work on Linux; many other (especially older) Unixlike  
systems will consider everything after the program name a single  
argument.

Best bet is to use a wrapper script.

-- 
brandon s. allbery [solaris,freebsd,perl,pugs,haskell] allbery at kf8nh.com
system administrator [openafs,heimdal,too many hats] allbery at ece.cmu.edu
electrical and computer engineering, carnegie mellon university    KF8NH




More information about the Haskell-Cafe mailing list