mirror of
https://github.com/rworkman/slackpkg
synced 2025-01-22 19:27:14 +01:00
Add blacklist to search option.
This avoid matching against the last field in pkglist - txz, tgz which prints multiple false positives with 'slackpkg search xz' etc.
This commit is contained in:
parent
a96e181033
commit
85c9f01361
1 changed files with 12 additions and 2 deletions
|
@ -784,8 +784,13 @@ function makelist() {
|
|||
done
|
||||
else
|
||||
for i in ${PRIORITY[@]}; do
|
||||
PKGS=$(grep "^${i}.*${PATTERN}" \
|
||||
${TMPDIR}/pkglist | cut -f6 -d\ )
|
||||
|
||||
# Test for search pattern in blacklist first
|
||||
grep -q "^${PATTERN}$" ${TMPDIR}/blacklist && continue
|
||||
|
||||
PKGS=$( cut -d\ -f1-7 ${TMPDIR}/pkglist |
|
||||
grep "^${i}.*${PATTERN}" | cut -f6 -d\ )
|
||||
|
||||
for FULLNAME in $PKGS ; do
|
||||
NAME=$(cutpkg ${FULLNAME})
|
||||
|
||||
|
@ -796,6 +801,11 @@ function makelist() {
|
|||
done
|
||||
fi
|
||||
rm -f $PKGNAMELIST
|
||||
rm ${TMPDIR}/waiting
|
||||
|
||||
echo -e "DONE\n"
|
||||
# We need to return early before the blacklist
|
||||
return
|
||||
;;
|
||||
esac
|
||||
LIST=$( printf "%s\n" $LIST | applyblacklist | sort -u )
|
||||
|
|
Loading…
Reference in a new issue