mongo/bazel/db_contrib_tool/db_contrib_tool.sh
Sean Lyons 309551f4eb SERVER-124473: Add bazel rules for running db-contrib-tool (#52092)
GitOrigin-RevId: 2bfaaca0973363a1e8164de5ed9b33fdbc9db864
2026-04-20 15:36:36 +00:00

14 lines
391 B
Bash
Executable File

#!/usr/bin/env bash
set -e
runfiles_root="$(pwd)"
db_contrib_tool="${runfiles_root}/../db_contrib_tool/db-contrib-tool"
# Change to the workspace root so that db-contrib-tool's relative-path defaults
# land inside the repo rather than the bazel runfiles directory.
if [[ -n "${BUILD_WORKSPACE_DIRECTORY:-}" ]]; then
cd "${BUILD_WORKSPACE_DIRECTORY}"
fi
exec "${db_contrib_tool}" "$@"