[Buildroot] [RFC PATCH 0/2] use `command -v' instead of `which'

Petr Vorel petr.vorel at gmail.com
Tue Sep 21 20:51:10 UTC 2021


Hi,

I've tested the patchset on dash as the default shell. But it certainly
deserve more people to have look and test.

NOTE: If accepted, we might want to use `command -v' also in scripts:

$ git grep '$(which'
package/fakedate/fakedate:for date in $(which -a date |tac); do
package/transmission/S92transmission:DAEMON=$(which $NAME)

Kind regards,
Petr

Petr Vorel (2):
  make: support: use `command -v' instead of `which'
  support/dependencies: don't check for `which'

 Makefile                                      | 22 +++++++++----------
 package/Makefile.in                           |  8 +++----
 support/dependencies/check-host-bison-flex.mk |  4 ++--
 support/dependencies/check-host-cmake.sh      |  2 +-
 support/dependencies/check-host-gzip.sh       |  2 +-
 support/dependencies/check-host-lzip.sh       |  4 ++--
 support/dependencies/check-host-python3.sh    |  2 +-
 support/dependencies/check-host-tar.sh        |  4 ++--
 support/dependencies/check-host-xzcat.sh      |  4 ++--
 support/dependencies/dependencies.sh          | 18 +++++++--------
 .../pkg-toolchain-external.mk                 |  2 +-
 11 files changed, 35 insertions(+), 37 deletions(-)

-- 
2.33.0



More information about the buildroot mailing list