]> gitweb.hhaalo.de Git - simple-backup.git/commitdiff
fix shellcheck issue
authorBastian Dehn <hhaalo@arcor.de>
Wed, 5 Aug 2026 13:54:14 +0000 (15:54 +0200)
committerBastian Dehn <hhaalo@arcor.de>
Wed, 5 Aug 2026 13:54:14 +0000 (15:54 +0200)
src/backup

index 02c4a5a3ffbce7c6242b042ed95151511c6e0a72..0b0d2dd020d6fd5ba285ef9f2172caeee5fa7fc8 100755 (executable)
@@ -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"
 }