aboutsummaryrefslogtreecommitdiff
path: root/devtools/bin/find_in_path.sh
diff options
context:
space:
mode:
Diffstat (limited to 'devtools/bin/find_in_path.sh')
-rwxr-xr-xdevtools/bin/find_in_path.sh19
1 files changed, 19 insertions, 0 deletions
diff --git a/devtools/bin/find_in_path.sh b/devtools/bin/find_in_path.sh
new file mode 100755
index 000000000000..e64ceea99ab8
--- /dev/null
+++ b/devtools/bin/find_in_path.sh
@@ -0,0 +1,19 @@
+#! /bin/sh
+#
+# $Id: find_in_path.sh,v 8.2 1999/09/23 20:42:22 gshapiro Exp $
+#
+EX_OK=0
+EX_NOT_FOUND=1
+
+ifs="$IFS"; IFS="${IFS}:"
+for dir in $PATH /usr/5bin /usr/ccs/bin
+do
+ if [ -r $dir/$1 ]
+ then
+ echo $dir/$1
+ exit $EX_OK
+ fi
+done
+IFS=$ifs
+
+exit $EX_NOT_FOUND