1
0
mirror of https://github.com/pi-hole/pi-hole synced 2024-12-22 14:58:08 +00:00

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>
This commit is contained in:
Rob Gill 2018-05-29 18:59:55 +10:00 committed by GitHub
parent 1911c3690d
commit ebeab06710
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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