diff --git a/advanced/Scripts/update.sh b/advanced/Scripts/update.sh index 372d6223..4c74eede 100644 --- a/advanced/Scripts/update.sh +++ b/advanced/Scripts/update.sh @@ -47,7 +47,15 @@ is_repo() { # Use git to check if directory is currently under VCS echo -n "::: Checking $1 is a repo..." cd "${1}" &> /dev/null || return 1 - git status &> /dev/null && echo " OK!"; return 0 || echo " not found!"; return 1 + git status &> /dev/null + + if [[ $? == 0 ]]; then + echo " OK!" + return 0 + else + echo " not found!" + return 1 + fi } make_repo() { diff --git a/automated install/basic-install.sh b/automated install/basic-install.sh index 4d74037d..90999703 100755 --- a/automated install/basic-install.sh +++ b/automated install/basic-install.sh @@ -759,7 +759,15 @@ is_repo() { # Use git to check if directory is currently under VCS echo -n "::: Checking $1 is a repo..." cd "${1}" &> /dev/null || return 1 - git status &> /dev/null && echo " OK!"; return 0 || echo " not found!"; return 1 + git status &> /dev/null + + if [[ $? == 0 ]]; then + echo " OK!" + return 0 + else + echo " not found!" + return 1 + fi } make_repo() {