mirror of
https://github.com/pi-hole/pi-hole.git
synced 2024-11-15 02:42:58 +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
1 changed files with 5 additions and 6 deletions
|
@ -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…
Reference in a new issue