change VARNAMES to VAR_NAMES

Also drop the overly-specific 'SBO' from SBOPKGLIST as it's actually
whatever $REPO is.
This commit is contained in:
slakmagik 2011-03-07 01:26:09 +00:00
parent bb87b804fa
commit 8155da8773

View File

@ -424,31 +424,31 @@ EOF
list_packages() { list_packages() {
# Get a list of SBo packages. # Get a list of SBo packages.
local SBOPKGLIST=$SBOPKGTMP/sbopkg_pkglist local PKG_LIST=$SBOPKGTMP/sbopkg_pkg_list
local REMOVELIST=$SBOPKGTMP/sbopkg_removelist local REMOVE_LIST=$SBOPKGTMP/sbopkg_remove_list
local CONFIRMLIST=$SBOPKGTMP/sbopkg_confirmlist local CONFIRM_LIST=$SBOPKGTMP/sbopkg_confirm_list
rm -f $SBOPKGLIST rm -f $PKG_LIST
find /var/log/packages -type f -name "*$REPO_TAG" \ find /var/log/packages -type f -name "*$REPO_TAG" \
-printf "%P\n" 2> /dev/null | sort > $SBOPKGLIST -printf "%P\n" 2> /dev/null | sort > $PKG_LIST
if [[ -s $SBOPKGLIST ]]; then if [[ -s $PKG_LIST ]]; then
if [[ $DIAG ]]; then if [[ $DIAG ]]; then
sed -i 's/$/ "" OFF/' $SBOPKGLIST sed -i 's/$/ "" OFF/' $PKG_LIST
dialog --separate-output --title "Installed $REPO_NAME Packages" --checklist \ dialog --separate-output --title "Installed $REPO_NAME Packages" --checklist \
"Check any packages you wish to uninstall" 20 65 13 \ "Check any packages you wish to uninstall" 20 65 13 \
--file $SBOPKGLIST 2> $REMOVELIST --file $PKG_LIST 2> $REMOVE_LIST
if [[ -s $REMOVELIST ]]; then if [[ -s $REMOVE_LIST ]]; then
sed 's/$/ "" ON/' $REMOVELIST > $CONFIRMLIST sed 's/$/ "" ON/' $REMOVE_LIST > $CONFIRM_LIST
dialog --defaultno --title "Removepkg confirmation" \ dialog --defaultno --title "Removepkg confirmation" \
--checklist "Remove the following packages?" 20 65 13 \ --checklist "Remove the following packages?" 20 65 13 \
--file $CONFIRMLIST 2> $REMOVELIST --file $CONFIRM_LIST 2> $REMOVE_LIST
if [[ $? == 0 ]]; then if [[ $? == 0 ]]; then
removepkg $(tr -d \" < $REMOVELIST) removepkg $(tr -d \" < $REMOVE_LIST)
read -n1 -ep "Press any key to continue: " read -n1 -ep "Press any key to continue: "
fi fi
fi fi
else else
$PAGER $SBOPKGLIST $PAGER $PKG_LIST
fi fi
else else
if [[ $DIAG ]]; then if [[ $DIAG ]]; then
@ -457,7 +457,7 @@ list_packages() {
installed.")" 8 40 installed.")" 8 40
fi fi
fi fi
rm -f $SBOPKGLIST $REMOVELIST $CONFIRMLIST rm -f $PKG_LIST $REMOVE_LIST $CONFIRM_LIST
} }
progressbar_cli() { progressbar_cli() {