From 4694e1261ff2d788bb07d2b7a261d301ff031e87 Mon Sep 17 00:00:00 2001 From: tangobravo14 Date: Thu, 7 Mar 2024 12:37:37 +0000 Subject: [PATCH] 3 --- AmRRON-Setup-Script.sh | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/AmRRON-Setup-Script.sh b/AmRRON-Setup-Script.sh index 364ff6a..8af6794 100755 --- a/AmRRON-Setup-Script.sh +++ b/AmRRON-Setup-Script.sh @@ -130,9 +130,13 @@ echo "${ERRCODE}" >> /tmp/failures function check_repo_version() { -GITSTATUS=$(cd $DIR && git status | grep 'Your branch is up to date') +GITSTATUS=$(git fetch --dry-run 2>/dev/null) -echo $GITSTATUS +if [[$GITSTATUS == '']]; then + echo 'Your repo is up to date' +else + echo $GITSTATUS +fi }