From: Yann E. MORIN <yann.morin.1998@free.fr>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH 1/1] Prefer 'command -v' over 'which' (for portability)
Date: Sat, 15 Feb 2014 12:44:18 +0100 [thread overview]
Message-ID: <20140215114418.GA5291@free.fr> (raw)
In-Reply-To: <52E7543D.9010103@mind.be>
Arnout, All,
Jumping back into this old thread, after it was referenced by Maxime in
his XBMC series...
On 2014-01-28 07:54 +0100, Arnout Vandecappelle spake thusly:
> On 27/01/14 10:19, Samuel Martin wrote:
> >"command -v" seems not playing very well with aliases:
> >
> >$ command -v make
> >alias make='~/.config/ctafconf/bin/colorwarper make'
> >$ which make
> >/usr/bin/make
>
> I don't think your .profile gets executed when running a shell script, so
> the alias will not be set. Bash does use BASH_ENV to specify a startup
> script, so perhaps we should unexport that.
Here is a little test I did:
$ cat Makefile
all:
echo "'$${buz}'"
foo
$ cat /tmp/foo.env
buz="BUZ"
echo BAR
alias foo='echo FOO'
$ BASH_ENV=/tmp/foo.env ENV=/tmp/foo.env make
echo "'${buz}'"
''
foo
make: foo: Command not found
make: *** [all] Error 127
So, it looks like neither BASH_ENV nor ENV are parsed (ENV is for when
bash is invoked in POSIX mode).
Regards,
Yann E. MORIN.
--
.-----------------.--------------------.------------------.--------------------.
| Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ |
| +33 223 225 172 `------------.-------: X AGAINST | \e/ There is no |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. |
'------------------------------^-------^------------------^--------------------'
next prev parent reply other threads:[~2014-02-15 11:44 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-01-25 14:11 [Buildroot] [PATCH 1/1] Prefer 'command -v' over 'which' (for portability) Bjørn Forsman
2014-01-27 6:44 ` Thomas Petazzoni
2014-01-27 19:47 ` Bjørn Forsman
2014-01-27 7:20 ` Arnout Vandecappelle
2014-01-27 20:13 ` Bjørn Forsman
2014-01-27 22:23 ` Bjørn Forsman
2014-01-27 9:19 ` Samuel Martin
2014-01-27 20:01 ` Bjørn Forsman
2014-01-27 20:32 ` Thomas De Schampheleire
2014-01-27 21:09 ` Bjørn Forsman
2014-01-28 6:54 ` Arnout Vandecappelle
2014-02-15 11:44 ` Yann E. MORIN [this message]
2014-02-15 13:29 ` Bjørn Forsman
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20140215114418.GA5291@free.fr \
--to=yann.morin.1998@free.fr \
--cc=buildroot@busybox.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.