Just realized I did not reply-all - thanks for all your help everyone,
hopefully the method suggested by David (below) will continue to work for me.
If not, I'll look into the method suggested by Steve using the source.fish or
source_compat.py he sent.
If this is indeed a common problem, is there a good place where we can document
how to source existing bash scripts?
-Kayle
Begin forwarded message:
> From: Kayle Sawyer <ksl...@gmail.com>
> Subject: Re: [Fish-users] environment setup
> Date: August 21, 2013 10:26:01 AM EDT
> To: David Adam <zanc...@ucc.gu.uwa.edu.au>
>
> Huzzah, that worked! Thanks David. Luckily, the script doesn't contain
> functions.
>
> I switched Terminal back to start in bash ('chsh -s /bin/bash'), then edited
> my .bash_profile to call the FreeSurfer script, then call fish. So far, it
> appears to work. A little clunky, but I'm happy!
>
> Thanks again.
> -Kayle
>
>
> On Aug 21, 2013, at 10:12 AM, David Adam <zanc...@ucc.gu.uwa.edu.au> wrote:
>
>> On Wed, 21 Aug 2013, Kayle Sawyer wrote:
>>> I use FreeSurfer brain MRI analysis software, which is mostly
>>> command-line based. To use the software, a script must be 'sourced'
>>> which sets environment variables, paths, and support libraries. The
>>> software comes with csh and sh versions, which obviously can't be
>>> sourced with fish. Running 'bash script.sh' won't work either, because
>>> after the variables are set up in bash I return to the fish shell with
>>> no setup. Do I need to port the script to fish, or is there an easier
>>> way? If I do have to re-write the script, I'm guessing I should start
>>> from the csh script - are there any tools which convert the syntax?
>>
>> One possible work around might be to do start bash, source the script,
>> then start fish. This won't help if the script contains functions, but if
>> it's just environment variables then you might be able to get away with
>> it.
>>
>> We don't have a converter for standard shell scripts at this stage,
>> although there is a development prototype on
>> https://github.com/fish-shell/fish-shell/issues/522#issuecomment-21585782
>> - YMMV.
>>
>> David Adam
>> fish committer
>> zanc...@uccc.gu.uwa.edu.au
>
------------------------------------------------------------------------------
Introducing Performance Central, a new site from SourceForge and
AppDynamics. Performance Central is your source for news, insights,
analysis and resources for efficient Application Performance Management.
Visit us today!
http://pubads.g.doubleclick.net/gampad/clk?id=48897511&iu=/4140/ostg.clktrk
_______________________________________________
Fish-users mailing list
Fish-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/fish-users