mirror of
https://github.com/sbopkg/sbopkg
synced 2024-11-09 19:50:25 +03:00
make list_packages() loop
Wrap list_packages()'s main dialog widget in a while loop so the user can return to deletion selection after reading readmes. Also correct the text in the widget (s/uninstall/remove./).
This commit is contained in:
parent
c3eb9de996
commit
2adf86f041
@ -450,10 +450,11 @@ list_packages() {
|
||||
-printf "%P\n" 2> /dev/null | sort > $PKG_LIST
|
||||
if [[ -s $PKG_LIST ]]; then
|
||||
if [[ $DIAG ]]; then
|
||||
while :; do
|
||||
sed 's/$/ "" OFF/' $PKG_LIST > $PKG_CHECKLIST
|
||||
dialog --separate-output --title "Installed $REPO_NAME Packages" \
|
||||
--extra-button --extra-label "View READMEs" \
|
||||
--checklist "Check any packages you wish to uninstall" \
|
||||
--checklist "Check any packages you wish to remove." \
|
||||
20 65 13 --file $PKG_CHECKLIST 2> $REMOVE_LIST
|
||||
case $? in
|
||||
0)
|
||||
@ -466,14 +467,19 @@ list_packages() {
|
||||
if [[ $? == 0 ]]; then
|
||||
removepkg $(cat $REMOVE_LIST)
|
||||
read -n1 -ep "Press any key to continue: "
|
||||
break
|
||||
fi
|
||||
else
|
||||
break
|
||||
fi
|
||||
;;
|
||||
3)
|
||||
nvabt2n $PKG_LIST $README_LIST
|
||||
view_readmes "Installed packages:" $README_LIST
|
||||
;;
|
||||
*) break ;;
|
||||
esac
|
||||
done
|
||||
else
|
||||
$PAGER $PKG_LIST
|
||||
fi
|
||||
|
Loading…
Reference in New Issue
Block a user