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

Re: debootstrap 1.0.93+nmu5



On Tue, 2018-04-03 at 18:48 +0900, Hideki Yamane wrote:
> On Tue, 3 Apr 2018 11:20:43 +0200
> Raphael Hertzog <hertzog@debian.org> wrote:
> > In most postinst snippets, it is used like this:
> > 
> > 	if which apt-config >/dev/null 2>&1; then
> > 
> > I don't see the need for a sub-shell.
> 
>  I've tried which command on NetBSD, it failed. So just check "test -e"
>  for /usr/bin/apt-config as below.
[...]

The portable way to look for a command, without running it or
hardcoding the directory, is 'command -v'.

Ben.

-- 
Ben Hutchings
Anthony's Law of Force: Don't force it, get a larger hammer.

Attachment: signature.asc
Description: This is a digitally signed message part


Reply to: