aboutsummaryrefslogtreecommitdiff
path: root/shunit2-2.0.3/bin/which
diff options
context:
space:
mode:
authorPeter Carbonetto2017-07-18 13:56:10 -0500
committerPeter Carbonetto2017-07-18 13:56:10 -0500
commit42dc643e44563f64d3b7593c051898b7879d9878 (patch)
tree33fcd6aa1066016aea9b54e97a84f4250562c007 /shunit2-2.0.3/bin/which
parent8de8f701755b3dc4c042591541aa86bfda02f36b (diff)
downloadpangemma-42dc643e44563f64d3b7593c051898b7879d9878.tar.gz
Moved shunit2 files to test directory.
Diffstat (limited to 'shunit2-2.0.3/bin/which')
-rwxr-xr-xshunit2-2.0.3/bin/which36
1 files changed, 0 insertions, 36 deletions
diff --git a/shunit2-2.0.3/bin/which b/shunit2-2.0.3/bin/which
deleted file mode 100755
index 9d7cc9f..0000000
--- a/shunit2-2.0.3/bin/which
+++ /dev/null
@@ -1,36 +0,0 @@
-#! /bin/sh
-# $Id$
-#
-# This is a simple implementation of the 'which' command for those OSes that
-# don't have one.
-#
-
-true; TRUE=$?
-false; FALSE=$?
-
-showAll=${FALSE}
-
-# process command line flags
-while getopts 'a' opt; do
- case ${opt} in
- a) showAll=${TRUE}
- esac
-done
-shift `expr ${OPTIND} - 1`
-
-# exit if no arguments were given
-[ $# -eq 0 ] && exit 1
-
-command=$1
-
-# search for command
-out=`echo "${PATH}" |sed "s/:/\n/g" |\
-while read path; do
- fullPath="${path}/${command}"
- if [ -x "${fullPath}" ]; then
- echo "${fullPath}"
- [ ${showAll} -eq ${FALSE} ] && break
- fi
-done`
-[ -z "${out}" ] && exit 1
-echo "${out}"