#!/usr/bin/env bash

# Quick and dirty script to download a file from Z3 and reupload it to S3.

set -euo pipefail

bucket="$1"
path="$2"

cd "$(mktemp --directory)"

wget --output-document z3_file "https://z3.zooxlabs.com/$bucket/$path"

aws s3 cp z3_file "s3://$bucket/$path"
