#!/usr/bin/env bash

set -eou pipefail

zrn_name="$1"
zrn_hash="$2"

bazel run sim/zrn_archive:get_zrn "$zrn_name" "$zrn_hash" > "$PWD/$zrn_name"
sed -i '/imagery_name/d' "$PWD/$zrn_name"
bazel run sim/zrn_archive:add_zrn_to_archive "$PWD/$zrn_name"
