mirror of
https://github.com/dw-0/kiauh.git
synced 2025-12-14 19:14:27 +05:00
fix: klipper update function
This commit is contained in:
@@ -18,15 +18,17 @@ update_klipper(){
|
|||||||
status_msg "Updating $GET_BRANCH"
|
status_msg "Updating $GET_BRANCH"
|
||||||
#fetching origin/master -> error
|
#fetching origin/master -> error
|
||||||
#rewriting origin/master to origin
|
#rewriting origin/master to origin
|
||||||
if [ "$GET_BRANCH" == "origin/master" ]; then
|
if [ "$GET_BRANCH" = "origin/master" ]; then
|
||||||
FETCH_BRANCH="origin"
|
FETCH_BRANCH="origin"
|
||||||
else
|
else
|
||||||
FETCH_BRANCH=$(echo "$GET_BRANCH" | cut -d "/" -f1)
|
FETCH_BRANCH=$(echo "$GET_BRANCH" | cut -d "/" -f1)
|
||||||
fi
|
fi
|
||||||
status_msg "Fetching from $FETCH_BRANCH"
|
status_msg "Fetching from $FETCH_BRANCH"
|
||||||
|
cd $KLIPPER_DIR
|
||||||
git fetch $FETCH_BRANCH -q && ok_msg "Fetch successfull!"
|
git fetch $FETCH_BRANCH -q && ok_msg "Fetch successfull!"
|
||||||
status_msg "Checking out $GET_BRANCH"
|
status_msg "Checking out $FETCH_BRANCH"
|
||||||
git checkout $GET_BRANCH -q && ok_msg "Checkout successfull!" && echo; ok_msg "Update complete!"
|
echo "git checkout $FETCH_BRANCH"
|
||||||
|
git checkout $FETCH_BRANCH -q && ok_msg "Checkout successfull!" && echo; ok_msg "Update complete!"
|
||||||
fi
|
fi
|
||||||
start_klipper; echo
|
start_klipper; echo
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user