From 5fef5f1ed49fc5eb50f849132759ce874167d4de Mon Sep 17 00:00:00 2001 From: Dan Schaper Date: Tue, 1 Nov 2016 11:54:14 -0700 Subject: [PATCH] Break down `is_repo` to make sure it does what is expected. --- advanced/Scripts/update.sh | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/advanced/Scripts/update.sh b/advanced/Scripts/update.sh index 783ae625..2af64738 100644 --- a/advanced/Scripts/update.sh +++ b/advanced/Scripts/update.sh @@ -49,7 +49,13 @@ 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 + if [[ $(git status --short) ]]; then + echo " OK!" + return 0 + else + echo " not found!" + return 1 + fi } make_repo() {