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=
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"
}