From d699a01fabaa04a1aad60f6ca5777f82ee24839a Mon Sep 17 00:00:00 2001 From: Jay Freeman Date: Sun, 6 Apr 2008 10:28:29 +0000 Subject: Drastic, sweeping modifications to support iPhone 1.2.0/2.0. git-svn-id: http://svn.telesphoreo.org/trunk@199 514c082c-b64e-11dc-b46d-3d985efe055d --- util/find.sh | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100755 util/find.sh (limited to 'util/find.sh') diff --git a/util/find.sh b/util/find.sh new file mode 100755 index 000000000..d45bea76b --- /dev/null +++ b/util/find.sh @@ -0,0 +1,31 @@ +#!/bin/bash + +#echo 1>&2 +#echo ::: find.sh "$@" 1>&2 + +while [[ $# -ne 0 ]]; do + if [[ $1 == /* ]]; then + unset found + + found=$(echo "${PKG_PATH}:" | while read -r -d ':' path; do + if [[ -e ${path}$1 ]]; then + if [[ ${found+@} ]]; then + echo -n ':' + else + found= + fi + + echo -n "${path}$1" + fi + done) + + #echo "=== ${found:=$1}" 1>&2 + echo "${found:=$1}" + else + echo "$1" + fi + + shift +done + +#echo 1>&2 -- cgit v1.2.3