mirror of
https://github.com/dw-0/kiauh.git
synced 2025-12-14 11:04:29 +05:00
fix: read branch error
This commit is contained in:
@@ -134,7 +134,7 @@ read_branch(){
|
|||||||
if [ -d $KLIPPER_DIR/.git ]; then
|
if [ -d $KLIPPER_DIR/.git ]; then
|
||||||
GET_BRANCH=$(cat ~/klipper/.git/logs/HEAD | grep "checkout" | tail -1 | sed "s/^.*to //")
|
GET_BRANCH=$(cat ~/klipper/.git/logs/HEAD | grep "checkout" | tail -1 | sed "s/^.*to //")
|
||||||
#if the log file is empty, we can assume that klipper just got cloned and therefore is still on origin/master
|
#if the log file is empty, we can assume that klipper just got cloned and therefore is still on origin/master
|
||||||
if [[ -z $(cat ~/klipper/.git/logs/HEAD) ]]; then
|
if [[ -z "$GET_BRANCH" ]]; then
|
||||||
GET_BRANCH="origin/master"
|
GET_BRANCH="origin/master"
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
|
|||||||
Reference in New Issue
Block a user