refactor: backup full config folder before install of mainsail/fluidd/klipperscreen
we don't know if some files need to be modified. so to be safe, backup all of them no matter what. this will also not create redundant intermediate backups. Signed-off-by: Dominik Willner th33xitus@gmail.com
This commit is contained in:
@@ -33,6 +33,9 @@ function install_fluidd() {
|
||||
process_disruptive_services
|
||||
|
||||
status_msg "Initializing Fluidd installation ..."
|
||||
### first, we create a backup of the full klipper_config dir - safety first!
|
||||
backup_klipper_config_dir
|
||||
|
||||
### check for other enabled web interfaces
|
||||
unset SET_LISTEN_PORT
|
||||
detect_enabled_sites
|
||||
@@ -128,9 +131,6 @@ function download_fluidd_macros() {
|
||||
configs=$(find "${KLIPPER_CONFIG}" -type f -name "printer.cfg" | sort)
|
||||
|
||||
if [[ -n ${configs} ]]; then
|
||||
### create a backup of the config folder
|
||||
backup_klipper_config_dir
|
||||
|
||||
for config in ${configs}; do
|
||||
path=$(echo "${config}" | rev | cut -d"/" -f2- | rev)
|
||||
if [[ ! -f "${path}/fluidd.cfg" ]]; then
|
||||
|
||||
@@ -29,6 +29,9 @@ function install_klipperscreen() {
|
||||
print_error "${error}" && return
|
||||
fi
|
||||
|
||||
### first, we create a backup of the full klipper_config dir - safety first!
|
||||
backup_klipper_config_dir
|
||||
|
||||
### install KlipperScreen
|
||||
klipperscreen_setup
|
||||
|
||||
|
||||
@@ -33,6 +33,9 @@ function install_mainsail() {
|
||||
process_disruptive_services
|
||||
|
||||
status_msg "Initializing Mainsail installation ..."
|
||||
### first, we create a backup of the full klipper_config dir - safety first!
|
||||
backup_klipper_config_dir
|
||||
|
||||
### check for other enabled web interfaces
|
||||
unset SET_LISTEN_PORT
|
||||
detect_enabled_sites
|
||||
@@ -128,9 +131,6 @@ function download_mainsail_macros() {
|
||||
configs=$(find "${KLIPPER_CONFIG}" -type f -name "printer.cfg" | sort)
|
||||
|
||||
if [[ -n ${configs} ]]; then
|
||||
### create a backup of the config folder
|
||||
backup_klipper_config_dir
|
||||
|
||||
for config in ${configs}; do
|
||||
path=$(echo "${config}" | rev | cut -d"/" -f2- | rev)
|
||||
if [[ ! -f "${path}/mainsail.cfg" ]]; then
|
||||
|
||||
Reference in New Issue
Block a user