changeset 904:2ed667428dbd

Fix path_search to actually use the pattern argument.
author Rob Landley <rob@landley.net>
date Thu, 26 Nov 2009 14:53:29 -0600
parents 5ffc758bf60a
children 023b577fb865
files sources/functions.sh
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/sources/functions.sh	Thu Nov 26 02:37:36 2009 -0600
+++ b/sources/functions.sh	Thu Nov 26 14:53:29 2009 -0600
@@ -693,14 +693,14 @@
 
 path_search()
 {
-
   # For each each $PATH element, loop through each file in that directory,
   # and create a symlink to the wrapper with that name.  In the case of
   # duplicates, keep the first one.
 
   echo "$1" | sed 's/:/\n/g' | while read DIR
   do
-    find "$DIR" -maxdepth 1 -mindepth 1 | sed 's@.*/@@' | while read FILE
+    find "$DIR" -maxdepth 1 -mindepth 1 -name "$2" | sed 's@.*/@@' | \
+    while read FILE
     do
       eval "$3"