mirror of
https://github.com/sbopkg/sbopkg
synced 2024-11-10 03:50:33 +03:00
add while loop in the search results display page so that after viewing a search item, the user is returned to the search results
This commit is contained in:
parent
b4c92cdce8
commit
98fdb52d1d
@ -580,13 +580,14 @@ gen_search_package () {
|
||||
# interface, jump to selected package.
|
||||
cd $LOCALREPO/$SLACKVER
|
||||
PKG=$1
|
||||
RESULTS=$(find . -mindepth 2 -type d | grep $PKG | sed -e 's/.\///')
|
||||
RESULTS=$(find . -mindepth 2 -maxdepth 2 -type d | grep $PKG | sed -e 's/.\///')
|
||||
if [ -n "$RESULTS" ]; then
|
||||
if [ "$DIAG" = 1 ]; then
|
||||
for i in $RESULTS; do
|
||||
DESC=$(grep -hZm1 ^$(echo "$i" | cut -d/ -f2) ./$i/slack-desc* | cut -d\( -f2- | cut -d\) -f1)
|
||||
echo "\"$i\" \"$DESC\"" >> $TMP/sbopkg_search_results
|
||||
done
|
||||
while [ -f $TMP/sbopkg_search_results ]; do
|
||||
dialog --title "Matches for $PKG" --menu "Please select an \
|
||||
item you wish to view." 20 70 14 --file \
|
||||
$TMP/sbopkg_search_results 2>$TMP/sbopkg_search_choice
|
||||
@ -598,8 +599,10 @@ item you wish to view." 20 70 14 --file \
|
||||
echo $SRCHPKG > $TMP/sbopkg_item_selection
|
||||
cd $LOCALREPO/$SLACKVER
|
||||
info_item
|
||||
fi
|
||||
else
|
||||
rm -rf $TMP/sbopkg_search_results
|
||||
fi
|
||||
done
|
||||
continue
|
||||
else
|
||||
echo "Found the following matches for $PKG:"
|
||||
|
Loading…
Reference in New Issue
Block a user