summaryrefslogtreecommitdiffstats
path: root/scripts/inspect.in
diff options
context:
space:
mode:
authorAndreas Gruenbacher <agruen@suse.de>2005-10-12 14:30:52 +0000
committerAndreas Gruenbacher <agruen@suse.de>2005-10-12 14:30:52 +0000
commitfcfb501c0e307005cec0439d711f574b847ce1c3 (patch)
treee711e782702c9312a06df1a7b1459fb9beb331a7 /scripts/inspect.in
parente87db7325aa7792a5a4bfc7bd7f17f0429c507ad (diff)
downloadquilt-fcfb501c0e307005cec0439d711f574b847ce1c3.tar.gz
- scripts/inspect.in: remove unnecessary path_search() function
and let the shell search the path internally.
Diffstat (limited to 'scripts/inspect.in')
-rw-r--r--scripts/inspect.in21
1 files changed, 2 insertions, 19 deletions
diff --git a/scripts/inspect.in b/scripts/inspect.in
index b929b0f..83f2db3 100644
--- a/scripts/inspect.in
+++ b/scripts/inspect.in
@@ -89,23 +89,6 @@ shopt -u nullglob
cat <<-'EOF' > $tmpdir/bin/wrapper
#! @BASH@
- # search the path for command $1
- path_search() {
- local cmd=$1 dir
- IFS=:
- set -- $PATH
- shift
-
- for dir in "$@"; do
- if [ -x $dir/$cmd ]
- then
- echo $dir/$cmd
- return 0
- fi
- done
- return 1
- }
-
# find original data file by md5sum
original_file() {
local file=$1 md5sum
@@ -179,8 +162,8 @@ cat <<-'EOF' > $tmpdir/bin/wrapper
esac
fi
- realcmd="$(path_search ${0##*/})" \
- && $realcmd "$@" < $tmpdir/data
+ PATH=${PATH#*:}
+ ${0##*/} "$@" < $tmpdir/data
EOF
chmod 755 $tmpdir/bin/wrapper
ln -s wrapper $tmpdir/bin/patch