From 2e4da7f220739c16bce5b4a8b78c842af4db0a7a Mon Sep 17 00:00:00 2001 From: th33xitus <> Date: Wed, 5 Aug 2020 00:09:18 +0200 Subject: [PATCH] fix read branch error --- scripts/status.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/scripts/status.sh b/scripts/status.sh index c4739f1..4fb54fa 100644 --- a/scripts/status.sh +++ b/scripts/status.sh @@ -143,6 +143,8 @@ print_branch(){ read_branch if [ "$GET_BRANCH" == "origin/master" ]; then PRINT_BRANCH="$GET_BRANCH " + elif [ "$GET_BRANCH" == "master" ]; then + PRINT_BRANCH="origin/master " elif [ "$GET_BRANCH" == "dmbutyugin/scurve-shaping" ]; then PRINT_BRANCH="scurve-shaping " elif [ "$GET_BRANCH" == "dmbutyugin/scurve-smoothing" ]; then @@ -166,7 +168,7 @@ read_local_klipper_commit(){ read_remote_klipper_commit(){ read_branch if [ ! -z "$GET_BRANCH" ];then - if [ "$GET_BRANCH" == "origin/master" ]; then + if [[ "$GET_BRANCH" == "origin/master" || "master" ]]; then git fetch origin master -q else git fetch $(echo "$GET_BRANCH" | cut -d"/" -f1) -q