[issue431] wm-ng on grml-medium 0.1

Frank Terbeck bts at bts.grml.org
Sat Feb 14 22:47:27 CET 2009


Frank Terbeck <ft at grml.org> added the comment:

Frank Terbeck <ft at bewatermyfriend.org>:
> Frank Terbeck <ft at bewatermyfriend.org>:
> > is_installed() {
> >     prog="$1"
> > 
> >     ret=1
> >     oifs="$IFS"
> >     IFS=:
> >     for dir in $PATH; do
> >         [ -x "${dir:-.}/$1" ] && ret=0
> 
> Thinking more about it, this is probably better done like this:
> 
>     
>         [ -x "${dir:-/bin}/$1" ] && ret=0

And another improvement:
        [ -x "${dir:-/bin}/$1" ] && ret=0 && break

For obvious reasons. :-)

Regards, Frank

----------
assignedto: mika
messages: 1244, 1245, 1876, 1877, 1881, 1883, 1884, 1887, 1888, 1889
nosy: ft, maddi, mika
priority: bug
status: in-progress
title: wm-ng on grml-medium 0.1
topic: release-stopper

_____________________________________
GRML issue tracker <bts at bts.grml.org>
<http://bts.grml.org/grml/issue431>
_____________________________________


More information about the Bugs-changes mailing list