File size: 787 Bytes
271f3e5 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 | #!/usr/bin/env bash
# Link metric code into evaluation/deps (run once per machine).
set -e
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
# shellcheck source=eval_common.sh
source "${SCRIPT_DIR}/eval_common.sh"
DEFAULT_DEPS=""
for candidate in \
"${EVAL_ROOT}/../../../evaluations" \
"${EVAL_ROOT}/../../../../evaluations"; do
if [ -d "${candidate}/VBench" ]; then
DEFAULT_DEPS="$(cd "${candidate}" && pwd)"
break
fi
done
SRC="${1:-${EVAL_DEPS_ROOT:-${DEFAULT_DEPS}}}"
LINK="${EVAL_ROOT}/deps"
if [ -z "${SRC}" ] || [ ! -d "${SRC}/VBench" ]; then
echo "Usage: bash scripts/setup_deps.sh [/path/to/evaluations]" >&2
exit 1
fi
ln -sfn "${SRC}" "${LINK}"
echo "[setup_deps] ${LINK} -> ${SRC}"
echo " EVAL_DEPS_ROOT is auto-detected via evaluation/deps"
|