lynx-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: lynx-dev djgpp bash test


From: Thomas Dickey
Subject: Re: lynx-dev djgpp bash test
Date: Mon, 6 Oct 2003 19:59:21 -0400 (EDT)

On Tue, 7 Oct 2003, Gisle Vanem wrote:

> The latest patch at Tom's site had this patch in LYmain.c:
>
> +    if (((cp = LYgetenv("SHELL")) != NULL)
> +      && (strstr(cp, "sh") != NULL))
> +       dj_is_bash = TRUE;
>
> This should be more robust IMHO (in case of
> SHELL=c:\shared\stuff\4dos.com). How about:
>
>   if (((cp = LYgetenv("SHELL")) != NULL)
>       && (strstr(cp, "/sh") != NULL || strstr(cp, "/bash") != NULL))
>        dj_is_bash = TRUE;

it did bother me a little, but I considered it just a cheap way to
reject "command.com" and "cmd.exe".

>
> My bash (v 205b.0) sets SHELL itself to
> /dev/env/DJDIR/bin/bash.exe whether it's started as
> bash or sh. So maybe just check for "bash.exe"?

conceivably you could also have pdksh (what other shells might someone
port to djgpp?)

>
> Gisle V.
>
> # rm /bin/laden
> /bin/laden: Not found
>
>
> ; To UNSUBSCRIBE: Send "unsubscribe lynx-dev" to address@hidden
>

-- 
Thomas E. Dickey
http://invisible-island.net
ftp://invisible-island.net

; To UNSUBSCRIBE: Send "unsubscribe lynx-dev" to address@hidden

reply via email to

[Prev in Thread] Current Thread [Next in Thread]