#!/bin/sh
set -eu
here=$(CDPATH= cd -- "$(dirname -- "$0")" && pwd)
out=${1:?Specify a new output directory}
mkdir -- "$out"
cd -- "$out"
curl --proto '=https' --fail --silent --show-error --location --max-time 30 --max-filesize 5000000 'https://raw.githubusercontent.com/Eric0312/FO-GS/f16d2fd8e1e821cb9bd8d8a1fb6dcc4086a9e28a/Synthetic_Experiment/Vary_sigma.ipynb' -o figure.ipynb
echo 'e0556ea4b52c6aad66868cf57e82c771baa1fae1982d79574f1dc506e9cad8ca  figure.ipynb' | sha256sum -c
mkdir outputs
cd outputs
export OPENBLAS_NUM_THREADS=1 OMP_NUM_THREADS=1 MPLBACKEND=Agg
if python3 -u "$here/replay.py" > ../run.stdout 2> ../run.stderr; then echo 0 > ../run.exit
else rc=$?; echo "$rc" > ../run.exit; exit "$rc"; fi
