"comma" syntax works with sbo search too

This commit is contained in:
Matteo Rossini 2022-01-08 18:07:45 +01:00
parent 80d76362cc
commit 0000f11008

View file

@ -2390,7 +2390,11 @@ if [ "$SLACKPKGPLUS" = "on" ];then
searchlistEX "$LIST"
echo -e "\nYou can search specific files using \"slackpkg file-search file\".\n"
fi
SBORESULT="$(grep -E -i "^SBO_[^ ]* [^ ]*${PATTERN/,/ }" $WORKDIR/pkglist 2>/dev/null|awk '{print $6}')"
if [[ "${PATTERN}" =~ .*,$ ]];then
SBORESULT="$(grep -E -i "^SBO_[^ ]* ${PATTERN/,/} " $WORKDIR/pkglist 2>/dev/null|awk '{print $6}')"
else
SBORESULT="$(grep -E -i "^SBO_[^ ]* [^ ]*${PATTERN}" $WORKDIR/pkglist 2>/dev/null|awk '{print $6}')"
fi
if [ ! -z "$SBORESULT" ];then
echo
echo "Also found in SBo (download it with 'slackpkg download <package>'):"