modify the search code (swap grep for -iname) which eliminates false positives; thanks to Erik Hanson for the fix

This commit is contained in:
chess.griffin 2008-08-12 17:33:43 +00:00
parent cce0fe45e3
commit 03814d07d8

View File

@ -580,7 +580,7 @@ gen_search_package () {
# interface, jump to selected package. # interface, jump to selected package.
cd $LOCALREPO/$SLACKVER cd $LOCALREPO/$SLACKVER
PKG=$1 PKG=$1
RESULTS=$(find . -mindepth 2 -maxdepth 2 -type d | grep -i $PKG | sed -e 's/.\///') RESULTS=$(find . -mindepth 2 -maxdepth 2 -type d -iname "*$PKG*" | sed -e 's/.\///')
if [ -n "$RESULTS" ]; then if [ -n "$RESULTS" ]; then
if [ "$DIAG" = 1 ]; then if [ "$DIAG" = 1 ]; then
for i in $RESULTS; do for i in $RESULTS; do