Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: zsh portable script
- X-seq: zsh-users 15192
- From: Thorsten Kampe <thorsten@xxxxxxxxxxxxxxxx>
- To: zsh-users@xxxxxxx
- Subject: Re: zsh portable script
- Date: Tue, 20 Jul 2010 16:01:00 +0200
- List-help: <mailto:zsh-users-help@zsh.org>
- List-id: Zsh Users List <zsh-users.zsh.org>
- List-post: <mailto:zsh-users@zsh.org>
- Mailing-list: contact zsh-users-help@xxxxxxx; run by ezmlm
- References: <1007130241570.5546@smasher> <201007121737.21296.joke@xxxxxxxxx> <EE6FB4D5-CC70-4394-BF0D-64FCA6497CA6@xxxxxxx>
* FranÃois Revol (Tue, 13 Jul 2010 15:43:31 +0200)
> Le 12 juil. 2010 Ã 17:37, Joke de Buhr a Ãcrit :
> > On Monday 12 July 2010 16:46:22 Atom Smasher wrote:
> >> on freebsd, zsh installs as /usr/local/bin/zsh. on linux (and most other
> >> systems?) it installs as /usr/bin/zsh.
> >>
> >> what's the best way to make zsh script portable between linux and freebsd?
> >>
> >> i could start the script with:
> >> #!/usr/bin/env zsh
> >>
> >> or i could specify that the script be executed as:
> >> zsh script
> >>
> >> is there a better way?
> >
> > Using env doesn't solve the problem either. There is no guarantee the "env"
> > program is installed under /usr/bin/env. It may as well be installed under
> > /usr/local/bin/env.
>
> Indeed, this kind of "too smart" stuff fails miserably on BeOS and Haiku, which does not have /usr.
Now that is a really convincing argument. BeOS was last updated in 2001
and "Haiku" has reached now Alpha stage after nine years. Seriously, on
systems that don't follow the FHS at all, you will have a lot more
serious problems running any kind of script.
Thorsten
Messages sorted by:
Reverse Date,
Date,
Thread,
Author