From 035e4bf727e14961b0b45de78d7b1ebe5cc1f81e Mon Sep 17 00:00:00 2001 From: Dan Schaper Date: Wed, 2 Nov 2016 03:55:04 -0700 Subject: [PATCH] Move value checks to `if` calls. --- advanced/Scripts/update.sh | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/advanced/Scripts/update.sh b/advanced/Scripts/update.sh index 1fce075f..74bd2e54 100644 --- a/advanced/Scripts/update.sh +++ b/advanced/Scripts/update.sh @@ -58,15 +58,13 @@ getGitFiles() { main() { - is_repo "${PI_HOLE_FILES_DIR}" - if [[ $? -ne 0 ]]; then #This is unlikely + if ! is_repo "${PI_HOLE_FILES_DIR}"; then #This is unlikely echo "::: Critical Error: Pi-Hole repo missing from system!" echo "::: Please re-run install script from https://github.com/pi-hole/pi-hole" exit 1; fi - is_repo "${ADMIN_INTERFACE_DIR}" &> /dev/null - if [[ $? -ne 0 ]]; then #This is unlikely + if ! $(is_repo "${ADMIN_INTERFACE_DIR}"); then #This is unlikely echo "::: Critical Error: Pi-Hole repo missing from system!" echo "::: Please re-run install script from https://github.com/pi-hole/pi-hole" exit 1;