refactor: sort after find

Signed-off-by: Dominik Willner th33xitus@gmail.com
This commit is contained in:
th33xitus
2022-04-27 11:23:13 +02:00
parent 82d6ebf459
commit 47e56bd950
9 changed files with 19 additions and 19 deletions

View File

@@ -97,7 +97,7 @@ function create_example_shell_command() {
backup_klipper_config_dir
local printer_cfgs
printer_cfgs=$(find "$(get_klipper_cfg_dir)" -type f -name "printer.cfg")
printer_cfgs=$(find "$(get_klipper_cfg_dir)" -type f -name "printer.cfg" | sort)
for cfg in ${printer_cfgs}; do
path=$(echo "${cfg}" | rev | cut -d"/" -f2- | rev)
if [ ! -f "${path}/shell_command.cfg" ]; then