fix: bug in klipper version check

This commit is contained in:
th33xitus
2020-08-16 10:19:58 +02:00
parent 68f7c98985
commit e00d2951a9
5 changed files with 4 additions and 3 deletions

0
kiauh.sh Executable file → Normal file
View File

0
resources/favicon.ico Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 14 KiB

After

Width:  |  Height:  |  Size: 14 KiB

0
scripts/install_octoprint.sh Executable file → Normal file
View File

0
scripts/rollback.sh Executable file → Normal file
View File

View File

@@ -176,12 +176,13 @@ read_local_klipper_commit(){
read_remote_klipper_commit(){
read_branch
if [ ! -z "$GET_BRANCH" ];then
if [[ "$GET_BRANCH" == "origin/master" || "master" ]]; then
git fetch origin master -q
if [ "$GET_BRANCH" = "origin/master" ] || [ "$GET_BRANCH" = "master" ]; then
git fetch origin -q
REMOTE_COMMIT=$(git rev-parse --short=8 origin)
else
git fetch $(echo "$GET_BRANCH" | cut -d"/" -f1) -q
REMOTE_COMMIT=$(git rev-parse --short=8 $GET_BRANCH)
fi
REMOTE_COMMIT=$(git rev-parse --short=8 $GET_BRANCH)
else
REMOTE_COMMIT="${red}--------${default}"
fi