Re: is this a bashism?
Adam Di Carlo wrote:
> This is irrelevant to you original question, but I really prefer to
> use the POSIX 'command' command in order to determine whether an
> executable exists on the path. I feel it is problematic to hard-code
> paths into scripts, and any way to avoid that is a good thing.
>
> if command -v update-menus >/dev/null 2>&1;
> then
> update-menus
> fi
>
> I'm CC'ing the debhelper maintainer to see what he thinks, since he says:
>
> if [ -x /usr/bin/update-menus ] ; then update-menus ; fi
In fact, I just ran into the 'command' idiom when I was adding doc-base
support to debhelper today. Debhelper now uses it for update-menus as well.
(BTW, it's debhelper@packages, not debhelper@lists.)
--
see shy jo
Reply to: