refactor: update update_menu.sh and update functions

Signed-off-by: Dominik Willner th33xitus@gmail.com
This commit is contained in:
th33xitus
2022-04-12 16:02:48 +02:00
parent acd53953ae
commit 63ef9a07db
10 changed files with 207 additions and 181 deletions

View File

@@ -358,6 +358,7 @@ function get_klipper_status(){
}
function get_local_klipper_commit(){
local commit
[ ! -d "${KLIPPER_DIR}" ] || [ ! -d "${KLIPPER_DIR}"/.git ] && return
cd "${KLIPPER_DIR}"
commit="$(git describe HEAD --always --tags | cut -d "-" -f 1,2)"
@@ -365,6 +366,7 @@ function get_local_klipper_commit(){
}
function get_remote_klipper_commit(){
local commit
[ ! -d "${KLIPPER_DIR}" ] || [ ! -d "${KLIPPER_DIR}"/.git ] && return
cd "${KLIPPER_DIR}" && git fetch origin -q
commit=$(git describe origin/master --always --tags | cut -d "-" -f 1,2)