[issue431] wm-ng on grml-medium 0.1

Frank Terbeck bts at bts.grml.org
Sun Feb 15 14:11:44 CET 2009


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

Let's face it, I'm an idiot. :-)
Missed one improvement I mentioned earlier (the '&& break').

[snip]
is_installed() {
    prog="$1"
    [ -z "$prog" ] && return 1

    ret=1
    oifs="$IFS"
    IFS=:
    for dir in $PATH; do
        [ -z "$dir" ] && continue
        [ -x "$dir/$prog" ] && ret=0 && break
    done

    IFS="$oifs"
    unset oifs
    return "$ret"
}
[snap]

[...]
> So, I'm happy with this now.

No, now I am. :)

Regards, Frank

----------
assignedto: mika
messages: 1244, 1245, 1876, 1877, 1881, 1883, 1884, 1887, 1888, 1889, 1892, 1893
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