refactor: backup_before_updates functions

Signed-off-by: Dominik Willner th33xitus@gmail.com
This commit is contained in:
th33xitus
2022-04-23 12:51:51 +02:00
parent 017738340d
commit be570ee8de
8 changed files with 34 additions and 34 deletions

View File

@@ -310,6 +310,16 @@ function switch_fluidd_releasetype() {
fi
}
function toggle_backup_before_update(){
read_kiauh_ini
local state="${backup_before_update}"
if [ "${state}" = "false" ]; then
sed -i '/backup_before_update=/s/false/true/' "${INI_FILE}"
else
sed -i '/backup_before_update=/s/true/false/' "${INI_FILE}"
fi
}
function set_custom_klipper_repo() {
read_kiauh_ini
local repo_url=${1} branch=${2}