X-Git-Url: http://git.marmaro.de/?a=blobdiff_plain;ds=sidebyside;f=etc%2Fmhn.find.sh;fp=etc%2Fmhn.find.sh;h=0000000000000000000000000000000000000000;hb=ec31c208d8618994f39ec21aa14d6cf4b7fdae66;hp=4b4230d4edad261951ebb0d0c2e615291c17cdcc;hpb=e1f54ce0994fca960d2680d07b05a9deb9e5485b;p=mmh diff --git a/etc/mhn.find.sh b/etc/mhn.find.sh deleted file mode 100755 index 4b4230d..0000000 --- a/etc/mhn.find.sh +++ /dev/null @@ -1,39 +0,0 @@ -#! /bin/sh -# -# mhn.find.sh -- check if a particular command is available -# - -if test -z "$2"; then - echo "usage: mhn.find.sh search-path program" 1>&2 - exit 1 -fi - -# PATH to search for programs -SEARCHPATH=$1 - -# program to search for -PROGRAM=$2 - -PGM= oIFS="$IFS" IFS=":" -for A in $SEARCHPATH; do - - # skip the directories `.' and `..' - if test "$A" = "." -o "$A" = ".."; then - continue - fi - - # if program was found in /usr/local/bin, then - # just echo program name, else echo full pathname - if test -f "$A/$PROGRAM"; then - if test "$A" = "/usr/local/bin"; then - PGM="$PROGRAM" - else - PGM="$A/$PROGRAM" - fi - - echo "$PGM" - exit 0 - fi -done -IFS="$oIFS" -