#!/usr/bin/env bash
set -euo pipefail

SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
# shellcheck source=lib.sh
source "${SCRIPT_DIR}/lib.sh"

VERL_DIR="${ROOT_DIR}/verl"

if [[ -d "${VERL_DIR}/.git" ]]; then
  echo "OK: verl repo exists: ${VERL_DIR}"
  exit 0
fi

echo "verl repo not found at ${VERL_DIR}; cloning..."
rm -rf "${VERL_DIR}"
git clone https://github.com/volcengine/verl.git "${VERL_DIR}"
echo "OK: cloned verl -> ${VERL_DIR}"

