public inbox for gentoo-dev@lists.gentoo.org
 help / color / mirror / Atom feed
Search results ordered by [date|relevance]  view[summary|nested|Atom feed]
thread overview below | download: 
* [gentoo-dev] dont use `which` in ebuilds
@ 2007-03-12 23:10 99% Mike Frysinger
  0 siblings, 0 replies; 1+ results
From: Mike Frysinger @ 2007-03-12 23:10 UTC (permalink / raw
  To: gentoo-dev

[-- Attachment #1: Type: text/plain, Size: 419 bytes --]

please dont use the `which` program in your ebuilds ... this thing isnt even 
close to having standard behavior out there plus people can unmerge it :)

instead, since we require bash for our ebuilds, use the builtin `type -p` ... 
here's some easy examples:

-if which foo 2>/dev/null ; then
+if type -p foo > /dev/null ; then

-local fullpath=$(which foo 2>/dev/null)
+local fullpath=$(type -p foo)
-mike

[-- Attachment #2: Type: application/pgp-signature, Size: 827 bytes --]

^ permalink raw reply	[relevance 99%]

Results 1-1 of 1 | reverse | options above
-- pct% links below jump to the message on this page, permalinks otherwise --
2007-03-12 23:10 99% [gentoo-dev] dont use `which` in ebuilds Mike Frysinger

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox