refactor(klipper.sh): use clone_klipper inside of update_klipper function

Signed-off-by: Dominik Willner th33xitus@gmail.com
This commit is contained in:
th33xitus
2022-05-19 09:17:22 +02:00
parent 0c8e394a8a
commit b0a5d12ecf

View File

@@ -470,10 +470,14 @@ function remove_klipper() {
#================================================# #================================================#
function update_klipper() { function update_klipper() {
read_kiauh_ini "${FUNCNAME[0]}"
local custom_repo="${custom_klipper_repo}"
local custom_branch="${custom_klipper_repo_branch}"
do_action_service "stop" "klipper" do_action_service "stop" "klipper"
if [[ ! -d ${KLIPPER_DIR} ]]; then if [[ ! -d ${KLIPPER_DIR} ]]; then
cd "${HOME}" && git clone "${KLIPPER_REPO}" clone_klipper "${custom_repo}" "${custom_branch}"
else else
backup_before_update "klipper" backup_before_update "klipper"
status_msg "Updating Klipper ..." status_msg "Updating Klipper ..."