atec2026-task-b-reproducibility / TaskB-B2Piper /code /fetch_reference_repos.sh
Datawhale
新增 ATEC2026 Task B 中文复现归档
90329e9
Raw
History Blame Contribute Delete
821 Bytes
#!/usr/bin/env bash
set -euo pipefail
# Fetch public references outside the tutorial repository so they are not
# accidentally vendored into the Datawhale release.
DEST="${1:-${TMPDIR:-$HOME/.cache/atec2026-reference}}"
mkdir -p "$DEST"
clone_or_update() {
local url="$1"
local name="$2"
if [[ -d "$DEST/$name/.git" ]]; then
git -C "$DEST/$name" fetch --depth=1 origin main
git -C "$DEST/$name" reset --hard FETCH_HEAD
else
git clone --depth=1 "$url" "$DEST/$name"
fi
}
clone_or_update \
"https://github.com/cicaburnwood-crypto/SLAM_ATEC2026_Simulation_Challenge.git" \
"SLAM_ATEC2026_Simulation_Challenge"
clone_or_update \
"https://github.com/StevenLiudw/Clear_ATEC2026_Simulation_Challenge.git" \
"Clear_ATEC2026_Simulation_Challenge"
printf 'references available under %s\n' "$DEST"