From 6fc76f9d0d26585067fe40294d4b8b91bfb072cf Mon Sep 17 00:00:00 2001 From: Matteo Rossini Date: Tue, 26 Jan 2016 23:23:12 +0100 Subject: [PATCH] Fixed non working the SENSITIVE_SEARCH function. --- src/slackpkgplus.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/slackpkgplus.sh b/src/slackpkgplus.sh index 41a0880..60aa3a6 100755 --- a/src/slackpkgplus.sh +++ b/src/slackpkgplus.sh @@ -916,23 +916,23 @@ if [ "$SLACKPKGPLUS" = "on" ];then }' l_dir=${DIR} > $PKGINFOS else # -- CMD==search - grep "^$DIR" /var/lib/slackpkg/pkglist|grep "/SLACKPKGPLUS_$SEARCHSTR/\|/$SEARCHSTR/\|/$SEARCHSTR \| [^ /]*$SEARCHSTR[^ /]* " > $PKGINFOS + grep ${GREPOPTS} "^$DIR" $WORKDIR/pkglist|grep ${GREPOPTS} "/SLACKPKGPLUS_$SEARCHSTR/\|/$SEARCHSTR/\|/$SEARCHSTR \| [^ /]*$SEARCHSTR[^ /]* " > $PKGINFOS fi while read PKGDIR PKGBASENAME PKGVER PKGARCH PKGBUILD PKGFULLNAME PKGPATH PKGEXT ; do # does nothing when the package has been handled ... - grep -q "^repo:${PKGDIR}:bname:${PKGBASENAME}:ver:${PKGVER}:fname:${PKGFULLNAME}:" $PKGLIST && continue + grep ${GREPOPTS} -q "^repo:${PKGDIR}:bname:${PKGBASENAME}:ver:${PKGVER}:fname:${PKGFULLNAME}:" $PKGLIST && continue # When a package P' with the same basename has been handled before the current package, this means # the package P' has precedence over P. - if grep -q ":bname:${PKGBASENAME}:" $PKGLIST ; then + if grep ${GREPOPTS} -q ":bname:${PKGBASENAME}:" $PKGLIST ; then # if the current package P is installed, this means the previous P' will be # proposed as an upgrade to P. In this case, the loop must continue without # any other action... - grep -q " $PKGFULLNAME " ${TMPDIR}/tmplist && continue + grep ${GREPOPTS} -q " $PKGFULLNAME " ${TMPDIR}/tmplist && continue # The current package P is not installed. In this case P must be shown as # being uninstalled and masked.