X-Git-Url: http://git.grml.org/?p=grml-scripts.git;a=blobdiff_plain;f=usr_bin%2Fgrml-exec-wrapper;fp=usr_bin%2Fgrml-exec-wrapper;h=4e5a3ccbafe7b044c4ac42ef8017a101238192ed;hp=d3ff8eeec350613c0a38ddfaca2f608fdf3bef49;hb=54e2502b301f2220e49e619b263be0e015d807cc;hpb=29bfc533ade39978f73afaecf01062151e43e267 diff --git a/usr_bin/grml-exec-wrapper b/usr_bin/grml-exec-wrapper index d3ff8ee..4e5a3cc 100755 --- a/usr_bin/grml-exec-wrapper +++ b/usr_bin/grml-exec-wrapper @@ -6,15 +6,16 @@ # License: This file is licensed under the GPL v2 or any later version. ################################################################################ +PN=$(basename "$0") + usage() { - printf "Usage: $0 [] + printf "Usage: %s [] Available options: -h | --help display this usage information -p check specified argument instead of default args, like: - $(basename $0) -p aumix xterm -T aumix -e aumix -" + %s -p aumix xterm -T aumix -e aumix\n" "${PN}" "${PN}" } is_installed() { @@ -49,7 +50,7 @@ else fi } -if [ -z "$1" -o "$1" = '-h' -o "$1" = '--help' ] ; then +if [ -z "$1" ] || [ "$1" = '-h' ] || [ "$1" = '--help' ] ; then usage exit 1 fi @@ -80,7 +81,7 @@ Looks like the grml flavour you are using does not ship ${PROG}. :( You can search for ${PROG} executing: -apt-get update && apt-cache search $(basename ${PROG}) +apt-get update && apt-cache search $(basename "${PROG}") " exit 1