#!/bin/bash
set -euo pipefail

SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
ROOT_DIR="$(dirname "$SCRIPT_DIR")"
. "$ROOT_DIR/config.sh"
. "$SCRIPT_DIR/utils.sh"

function usage {
	echo "Usage: $0 id"
	exit 1
}

id=${1:-}
if [[ -z "$id" ]]; then
	usage
fi

prepare_notary_auth

xcrun notarytool log "$id" "${notary_auth[@]}" notary_log.json
cat notary_log.json
