fix: always use system home directory (#303)

This commit is contained in:
Pedro Lamas
2023-02-28 14:30:42 +00:00
committed by GitHub
parent fd27db28d4
commit e3ed223b5c
8 changed files with 18 additions and 18 deletions

View File

@@ -106,7 +106,7 @@ function create_example_shell_command() {
backup_klipper_config_dir
local configs regex path
regex="\/home\/${USER}\/([A-Za-z0-9_]+)\/config\/printer\.cfg"
regex="${HOME//\//\\/}\/([A-Za-z0-9_]+)\/config\/printer\.cfg"
configs=$(find "${HOME}" -maxdepth 3 -regextype posix-extended -regex "${regex}" | sort)
for cfg in ${configs}; do