diff options
author | Andreas Gruenbacher <agruen@suse.de> | 2005-10-12 14:30:52 +0000 |
---|---|---|
committer | Andreas Gruenbacher <agruen@suse.de> | 2005-10-12 14:30:52 +0000 |
commit | fcfb501c0e307005cec0439d711f574b847ce1c3 (patch) | |
tree | e711e782702c9312a06df1a7b1459fb9beb331a7 /scripts/inspect.in | |
parent | e87db7325aa7792a5a4bfc7bd7f17f0429c507ad (diff) | |
download | quilt-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.in | 21 |
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 |