mirror of
https://github.com/dw-0/kiauh.git
synced 2025-12-13 02:24:27 +05:00
refactor!: update KIAUH for recent moonraker changes (#245)
This commit is contained in:
@@ -105,10 +105,11 @@ function create_example_shell_command() {
|
||||
### create a backup of the config folder
|
||||
backup_klipper_config_dir
|
||||
|
||||
local printer_cfgs path
|
||||
printer_cfgs=$(find "$(get_klipper_cfg_dir)" -type f -name "printer.cfg" | sort)
|
||||
local configs regex path
|
||||
regex="\/home\/${USER}\/([A-Za-z0-9_]+)\/config\/printer\.cfg"
|
||||
configs=$(find "${HOME}" -maxdepth 3 -regextype posix-extended -regex "${regex}" | sort)
|
||||
|
||||
for cfg in ${printer_cfgs}; do
|
||||
for cfg in ${configs}; do
|
||||
path=$(echo "${cfg}" | rev | cut -d"/" -f2- | rev)
|
||||
|
||||
if [[ ! -f "${path}/shell_command.cfg" ]]; then
|
||||
|
||||
Reference in New Issue
Block a user