From: Bastian Dehn Date: Wed, 5 Aug 2026 13:54:14 +0000 (+0200) Subject: fix shellcheck issue X-Git-Tag: v1.0.6^2~1^2~57 X-Git-Url: https://gitweb.hhaalo.de/?a=commitdiff_plain;h=86ba8630a39171575ce7c6374c7a7e050a57717d;p=simple-backup.git fix shellcheck issue --- diff --git a/src/backup b/src/backup index 02c4a5a..0b0d2dd 100755 --- a/src/backup +++ b/src/backup @@ -130,7 +130,8 @@ backup_remotes() local backup_path= local machines=() backup_path=$(echo "$config" | jq --raw-output '.backup_path') - machines=($(echo "$config" | yq --raw-output '.machines | keys[]')) + mapfile -t machines < <(echo "$config" \ + | jq --raw-output '.machines | keys[]') local full_backup_path="$backup_path/$backup_dir" local machine= @@ -167,7 +168,10 @@ main() backup_dir=$(get_backup_dir "$config") echo "ℹ️ INFO: backup folder $backup_dir" create_backup_dir "$config" "$backup_dir" - backup_remotes "$config" "$backup_dir" "$last_backup_dir_path" + backup_remotes "$config" \ + "$backup_dir" \ + "$last_backup_dir_path" \ + || return $? echo "✅ SUCCESS: backup" }