Allow the Studio build script to be run outside the git checkout.

PiperOrigin-RevId: 912421771
Change-Id: Ie355d2f59cd43166ab06aa49349d87a0f5f9151c
This commit is contained in:
Michael Moss
2026-05-08 02:51:24 -07:00
committed by Copybara-Service
parent b7b96d2acc
commit 3ef083eecc
+4 -3
View File
@@ -51,7 +51,8 @@ if [[ "$explicit_action" == false ]]; then
do_build=true
fi
cd "$(git rev-parse --show-toplevel)"
GIT_ROOT="${GIT_ROOT:-$(git rev-parse --show-toplevel)}"
cd "${GIT_ROOT}"
# Configure MuJoCo Studio
if [[ "$do_configure" == true ]]; then
@@ -97,8 +98,8 @@ if [[ "$do_build" == true ]]; then
echo "Use the following command to run mujoco_studio"
echo ""
if [[ "${OS_NAME}" == "windows" ]]; then
echo " cd $(git rev-parse --show-toplevel)/build/bin && ./${build_type}/mujoco_studio.exe "
echo " cd ${GIT_ROOT}/build/bin && ./${build_type}/mujoco_studio.exe "
else
echo " cd $(git rev-parse --show-toplevel)/build/bin && ./mujoco_studio "
echo " cd ${GIT_ROOT}/build/bin && ./mujoco_studio "
fi
fi