From 7f2247e6eed19cfed019439f3667bbac248e467e Mon Sep 17 00:00:00 2001 From: Matteo Rossini Date: Sun, 22 Jul 2018 11:34:51 +0200 Subject: [PATCH] slackpkg+ did not work properly when run as a package group instead single packages. Thankyou to Poprocks an phenixia2003 --- src/slackpkgplus.sh | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/slackpkgplus.sh b/src/slackpkgplus.sh index d512abb..9eaa06c 100755 --- a/src/slackpkgplus.sh +++ b/src/slackpkgplus.sh @@ -1006,9 +1006,13 @@ if [ "$SLACKPKGPLUS" = "on" ];then grep "^${REPOSITORY} " ${TMPDIR}/priority.filters | cut -f2 -d" " > ${TMPDIR}/filter.patterns grep "^[.][*] " ${TMPDIR}/priority.filters | cut -f2 -d" " >> ${TMPDIR}/filter.patterns - # If no filter patterns were found, or if the selected package does not - # match any of the filter patterns, the selected package is rejected... - if [ ! -s ${TMPDIR}/filter.patterns ] || ! echo "${PKGDATA[5]}.${PKGDATA[7]}" | grep -q -f ${TMPDIR}/filter.patterns ; then + # The selected package is rejected when (1) no filter patterns were found, or (2) + # none of the filter patterns matches the package's data + # + if [ ! -s ${TMPDIR}/filter.patterns ] \ + || \ + ! echo "${PKGDATA[*]}" | grep -q -f ${TMPDIR}/filter.patterns ; then + PKGDATA="" LINEIDX="" NAME=""