grub-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] grub-mkconfig: use portable 'command -v' to detect installed


From: Eli Schwartz
Subject: Re: [PATCH] grub-mkconfig: use portable 'command -v' to detect installed programs
Date: Tue, 22 Oct 2019 20:43:29 -0400
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.1.1

On 10/21/19 11:09 AM, Daniel Kiper wrote:
> On Wed, Oct 16, 2019 at 11:03:06PM -0400, Eli Schwartz wrote:
>> 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:
>> bash, dash, busybox ash, ksh, mksh, 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.
> 
> Missing SOB. I can add it in your behalf if this not a problem for you.
> Otherwise Reviewed-by: Daniel Kiper <address@hidden>
My apologies for the missing Signed-off-by, I did not realize that this
project expects to see them and I usually configure that per-repository.

You are more than welcome to add it on my behalf, and I hereby confirm
my Developer Certificate of Origin

-- 
Eli Schwartz
Arch Linux Bug Wrangler and Trusted User

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]