Re: 2.2.18pre12 fix for some distros

From: Herbert Xu (herbert@gondor.apana.org.au)
Date: Sat Sep 30 2000 - 18:35:01 EDT

  • Next message: Steven N. Hirsch: "Re: 2.2.18pre12 mouse detection problem"

    On Sat, Sep 30, 2000 at 03:13:02PM +0100, Alan Cox wrote:
    > > Please replace which with "command -v" which is required by SuS in /bin/sh.
    >
    > command -v breaks on some setups. One problem can be seen easily by doing this
    >
    > # command -v ls
    > alias ls='ls --color=tty'

    .bashrc is only read for interactive shells. Besides, if which is a bash
    alias as well,

    $ command -v which
    alias which='type -path'
    $

    it will break too,

    $ which which
    $

    I think what you can do is to ignore the value returned by command -v, and
    just use it is an indication that this thing exists. After all, if you can
    find it using command -v, just calling it will work too. Something like

    if command -v gcc272 > /dev/null 2> /dev/null; then echo gcc272; else \
    echo gcc; fi

    -- 
    Debian GNU/Linux 2.2 is out! ( http://www.debian.org/ )
    Email:  Herbert Xu ~{PmV>HI~} <herbert@gondor.apana.org.au>
    Home Page: http://gondor.apana.org.au/~herbert/
    PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    Please read the FAQ at http://www.tux.org/lkml/
    



    This archive was generated by hypermail 2b29 : Sat Sep 30 2000 - 18:39:25 EDT