summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDave Woodfall <dave@slackbuilds.org>2021-02-24 23:14:18 +0000
committerDave Woodfall <dave@slackbuilds.org>2021-02-24 23:14:18 +0000
commita96e181033b963ea33b53597375598909a128d13 (patch)
treeaa1c7f370dff889c2ceaf13004aab3027e995ec9
parent19c9fc0d9bd63de996db3ac7b2e7704842771ded (diff)
downloadslackpkg-a96e181033b963ea33b53597375598909a128d13.tar.xz
Move applyblacklist to end of makelist()
Change -E to -F in applyblacklist() Remove '>' prompt in answer()
-rw-r--r--files/core-functions.sh11
1 files changed, 5 insertions, 6 deletions
diff --git a/files/core-functions.sh b/files/core-functions.sh
index 5681e08..75f6ae6 100644
--- a/files/core-functions.sh
+++ b/files/core-functions.sh
@@ -618,7 +618,7 @@ function mkregex_blacklist() {
# Blacklist filter
#
function applyblacklist() {
- grep -vE -f ${TMPDIR}/blacklist
+ grep -vF -f ${TMPDIR}/blacklist
}
# Function to make install/reinstall/upgrade lists
@@ -635,10 +635,9 @@ function makelist() {
awk -f /usr/libexec/slackpkg/pkglist.awk > ${TMPDIR}/tmplist
else
ls -1 $ROOT/var/log/packages/* |
- awk -f /usr/libexec/slackpkg/pkglist.awk |
- applyblacklist > ${TMPDIR}/tmplist
+ awk -f /usr/libexec/slackpkg/pkglist.awk > ${TMPDIR}/tmplist
fi
- cat ${WORKDIR}/pkglist | applyblacklist > ${TMPDIR}/pkglist
+ cat ${WORKDIR}/pkglist > ${TMPDIR}/pkglist
touch ${TMPDIR}/waiting
@@ -799,7 +798,7 @@ function makelist() {
rm -f $PKGNAMELIST
;;
esac
- LIST=$(echo -e $LIST | tr \ "\n" | uniq )
+ LIST=$( printf "%s\n" $LIST | applyblacklist | sort -u )
rm ${TMPDIR}/waiting
@@ -821,7 +820,7 @@ function answer() {
ANSWER="$DEFAULT_ANSWER"
echo $DEFAULT_ANSWER
else
- read -p "> " ANSWER
+ read ANSWER
fi
}