2 # Filename: grml-exec-wrapper
3 # Purpose: simple but smart program execution wrapper
4 # Authors: grml-team (grml.org), (c) Michael Prokop <mika@grml.org>
5 # Bug-Reports: see http://grml.org/bugs/
6 # License: This file is licensed under the GPL v2 or any later version.
7 ################################################################################
11 [ -z "$prog" ] && return 1
17 [ -z "$dir" ] && continue
18 [ -x "$dir/$prog" ] && ret=0 && break
26 # use Xdisplay only if present and running under X:
28 if is_installed Xdialog && test -n "$DISPLAY" ; then
29 Xdialog --title "grml-exec-wrapper" --msgbox "$1" 0 0 0
36 display_info "Usage: $0 <program> [<arguments>]"
42 # make sure to support 'grml-exec-wrapper sudo wireshark' as well:
47 if is_installed "$PROG" ; then
51 display_info "Sorry: ${PROG} not available.
53 Looks like the grml flavour you are using does not ship ${PROG}. :(
55 You can search for ${PROG} executing:
57 apt-get update && apt-cache search ${PROG}
62 ## END OF FILE #################################################################