fix: always use system home directory

Signed-off-by: Pedro Lamas <pedrolamas@gmail.com>
This commit is contained in:
Pedro Lamas
2023-02-28 13:37:22 +00:00
parent fd27db28d4
commit 6249ab10a6
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