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.