if is_installed Xdialog && test -n "$DISPLAY" ; then
Xdialog --title "grml-exec-wrapper" --msgbox "$1" 0 0 0
else
- print "$1">&2
+ printf '%s\n' "$1">&2
fi
}
exit 1
fi
-RC='0'
PROG="$1"
# make sure to support 'grml-exec-wrapper sudo wireshark' as well:
case $PROG in
- *sudo*) PROG="$2" ;;
+ *sudo*) PROG="$2" ;;
esac
if is_installed "$PROG" ; then
- exec $@
-else
- RC=1
- display_info "Sorry: ${PROG} not available.
+ exec "$@"
+fi
+
+display_info "Sorry: ${PROG} not available.
Looks like the grml flavour you are using does not ship ${PROG}. :(
apt-get update && apt-cache search ${PROG}
"
-fi
-exit $RC
+exit 1
## END OF FILE #################################################################