On Mon, 19 Mar 2018 at 13:39:30 +0000, Daniel Stone wrote:
> On 19 March 2018 at 13:27, Emil Velikov <[email protected]> wrote:
> >> I'd not realised AC_PROG_NM didn't set a full path. Brilliant. Maybe
> >> replace test -x "$NM" with $NM -V >/dev/null 2>&1? Or just trusting it
> >> works if it's non-empty is fine too.
> >>
> > I'd go with non-empty - everything else seems like an overkill.

If you ever want the more full version for something else, I think

    command -v "$command" >/dev/null

is the canonical way to ask a POSIX shell "could I invoke $command?".
It exits successfully if $command is a function, an alias, a shell
built-in, the basename of an executable in $PATH, an executable found
by relative or absolute path, an alias or a shell reserved word.

    smcv
_______________________________________________
wayland-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/wayland-devel

Reply via email to