refactor: klipper switch repo mechanics

Signed-off-by: Dominik Willner th33xitus@gmail.com
This commit is contained in:
th33xitus
2022-04-27 11:01:58 +02:00
parent d000ba1373
commit 82d6ebf459
4 changed files with 59 additions and 48 deletions

View File

@@ -334,9 +334,9 @@ function toggle_backup_before_update(){
function set_custom_klipper_repo() {
read_kiauh_ini "${FUNCNAME[0]}"
local repo_url=${1} branch=${2}
local repo=${1} branch=${2}
sed -i "/^custom_klipper_repo=/d" "${INI_FILE}"
sed -i '$a'"custom_klipper_repo=${repo_url}" "${INI_FILE}"
sed -i '$a'"custom_klipper_repo=${repo}" "${INI_FILE}"
sed -i "/^custom_klipper_repo_branch=/d" "${INI_FILE}"
sed -i '$a'"custom_klipper_repo_branch=${branch}" "${INI_FILE}"
}