mirror of
https://github.com/pi-hole/pi-hole
synced 2024-12-22 23:08:07 +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:
parent
1911c3690d
commit
ebeab06710
@ -57,10 +57,10 @@ if [ -x "$(command -v rpm)" ]; then
|
|||||||
# Fedora Family
|
# Fedora Family
|
||||||
PKG_REMOVE="${PKG_MANAGER} remove -y"
|
PKG_REMOVE="${PKG_MANAGER} remove -y"
|
||||||
package_check() {
|
package_check() {
|
||||||
rpm -qa | grep ^$1- > /dev/null
|
rpm -qa | grep "^$1-" > /dev/null
|
||||||
}
|
}
|
||||||
package_cleanup() {
|
package_cleanup() {
|
||||||
${SUDO} ${PKG_MANAGER} -y autoremove
|
"${SUDO}" "${PKG_MANAGER}" -y autoremove
|
||||||
}
|
}
|
||||||
elif [ -x "$(command -v apt-get)" ]; then
|
elif [ -x "$(command -v apt-get)" ]; then
|
||||||
# Debian Family
|
# 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"
|
dpkg-query -W -f='${Status}' "$1" 2>/dev/null | grep -c "ok installed"
|
||||||
}
|
}
|
||||||
package_cleanup() {
|
package_cleanup() {
|
||||||
${SUDO} ${PKG_MANAGER} -y autoremove
|
"${SUDO}" "${PKG_MANAGER}" -y autoremove
|
||||||
${SUDO} ${PKG_MANAGER} -y autoclean
|
"${SUDO}" "${PKG_MANAGER}" -y autoclean
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
echo -e " ${CROSS} OS distribution not supported"
|
echo -e " ${CROSS} OS distribution not supported"
|
||||||
@ -81,8 +81,7 @@ removeAndPurge() {
|
|||||||
# Purge dependencies
|
# Purge dependencies
|
||||||
echo ""
|
echo ""
|
||||||
for i in "${DEPS[@]}"; do
|
for i in "${DEPS[@]}"; do
|
||||||
package_check ${i} > /dev/null
|
if package_check "${i}" > /dev/null; then
|
||||||
if [[ "$?" -eq 0 ]]; then
|
|
||||||
while true; do
|
while true; do
|
||||||
read -rp " ${QST} Do you wish to remove ${COL_WHITE}${i}${COL_NC} from your system? [Y/N] " yn
|
read -rp " ${QST} Do you wish to remove ${COL_WHITE}${i}${COL_NC} from your system? [Y/N] " yn
|
||||||
case ${yn} in
|
case ${yn} in
|
||||||
|
Loading…
Reference in New Issue
Block a user