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

Re: is this a bashism?

On Mon, 21 Dec 1998 19:16:04 -0600, "Marcelo E. Magallon" <mmagallo@efis.ucr.ac.cr> said:
> #!/bin/sh -e [ -x /usr/bin/update-menus ] && update-menus

>  I've got a bug report that says it is. Ash bails out with exit
> status 1 if update-menus doesn't exist.

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;

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

.....Adam Di Carlo....adam@onShore.com.....<URL:http://www.onShore.com/>

Reply to: