#!/usr/bin/env bash

# Usage: save_params.sh <pair> <regime> <sourcefile> <destname>

set -e

if [ $# -ne 4 ]; then
  echo "Usage: $0 <pair> <bull|bear> <sourcefile> <destname>" >&2
  exit 1
fi

PAIR="$1"
REGIME="$2"
SRC="$3"
DESTNAME="$4"

mkdir -p "params/${PAIR}/${REGIME}"

DEST="params/${PAIR}/${REGIME}/${DESTNAME}.json"
cp "$SRC" "$DEST"
echo "Saved: $DEST"