Eli Schwartz 28a7e597de grub-mkconfig: Use portable "command -v" to detect installed programs
The "which" utility is not guaranteed to be installed either, and if it
is, its behavior is not portable either.

Conversely, the "command -v" shell builtin is required to exist in all
POSIX 2008 compliant shells, and is thus guaranteed to work everywhere.

Examples of open-source shells likely to be installed as /bin/sh on
Linux, which implement the 11-year-old standard: ash, bash, busybox,
dash, ksh, mksh and zsh.

A side benefit of using the POSIX portable option is that it requires
neither an external disk executable, nor (because unlike "which", the
exit code is reliable) a subshell fork. This therefore represents a mild
speedup.

Signed-off-by: Eli Schwartz <eschwartz@archlinux.org>
Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
2019-10-28 15:38:48 +01:00
..
2010-09-15 14:46:53 +02:00
2019-03-05 10:23:47 +01:00
2019-03-05 10:23:47 +01:00
2015-03-04 01:00:19 +01:00
2019-03-05 10:23:47 +01:00
2019-02-25 14:02:05 +01:00
2019-03-25 15:08:49 +01:00
2013-11-07 06:35:50 +01:00
2019-02-25 14:02:05 +01:00
2015-03-04 01:00:19 +01:00