Appease Stickler-bot

So... originally no changes were made to the code, but Stickler-bot was unimpressed, so I've followed its suggestions.

Signed-off-by: Rob Gill <rrobgill@protonmail.com>
pull/2196/head
Rob Gill 6 years ago committed by GitHub
parent 1911c3690d
commit ebeab06710
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -57,10 +57,10 @@ if [ -x "$(command -v rpm)" ]; then
# Fedora Family
PKG_REMOVE="${PKG_MANAGER} remove -y"
package_check() {
rpm -qa | grep ^$1- > /dev/null
rpm -qa | grep "^$1-" > /dev/null
}
package_cleanup() {
${SUDO} ${PKG_MANAGER} -y autoremove
"${SUDO}" "${PKG_MANAGER}" -y autoremove
}
elif [ -x "$(command -v apt-get)" ]; then
# Debian Family
@ -69,8 +69,8 @@ elif [ -x "$(command -v apt-get)" ]; then
dpkg-query -W -f='${Status}' "$1" 2>/dev/null | grep -c "ok installed"
}
package_cleanup() {
${SUDO} ${PKG_MANAGER} -y autoremove
${SUDO} ${PKG_MANAGER} -y autoclean
"${SUDO}" "${PKG_MANAGER}" -y autoremove
"${SUDO}" "${PKG_MANAGER}" -y autoclean
}
else
echo -e " ${CROSS} OS distribution not supported"
@ -81,8 +81,7 @@ removeAndPurge() {
# Purge dependencies
echo ""
for i in "${DEPS[@]}"; do
package_check ${i} > /dev/null
if [[ "$?" -eq 0 ]]; then
if package_check "${i}" > /dev/null; then
while true; do
read -rp " ${QST} Do you wish to remove ${COL_WHITE}${i}${COL_NC} from your system? [Y/N] " yn
case ${yn} in

Loading…
Cancel
Save