From efa4aa8f56dbe2f9030f2029f440b651dc96aeb1 Mon Sep 17 00:00:00 2001 From: Matthijs van der Burgh Date: Fri, 26 Apr 2024 14:55:52 +0200 Subject: [PATCH] [vscode] update env vars --- vscode/install.bash | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/vscode/install.bash b/vscode/install.bash index 9396ef9f8..5107f44f5 100644 --- a/vscode/install.bash +++ b/vscode/install.bash @@ -11,8 +11,8 @@ code --install-extension ms-iot.vscode-ros\ --force # Configure workspace -workspacefile="${TUE_SYSTEM_DIR}/.vscode/settings.json" -mkdir -p "${TUE_SYSTEM_DIR}/.vscode" +workspacefile="${TUE_ENV_WS_DIR}/.vscode/settings.json" +mkdir -p "${TUE_ENV_WS_DIR}/.vscode" if [[ ! -f "${workspacefile}" ]] then tue-install-cp workspace_settings.json "${workspacefile}" @@ -23,14 +23,17 @@ else fi fi -# Install and configure catkin tools extension -if ! catkin config --workspace "$TUE_SYSTEM_DIR" | grep -q "DCMAKE_EXPORT_COMPILE_COMMANDS" +if [[ "${TUE_ENV_ROS_VERSION}" == "1" ]] then - catkin config --workspace "$TUE_SYSTEM_DIR" --append-args -DCMAKE_EXPORT_COMPILE_COMMANDS=ON + # Install and configure catkin tools extension + if ! catkin config --workspace "$TUE_ENV_WS_DIR" | grep -q "DCMAKE_EXPORT_COMPILE_COMMANDS" + then + catkin config --workspace "$TUE_ENV_WS_DIR" --append-args -DCMAKE_EXPORT_COMPILE_COMMANDS=ON + fi fi # Configure to build only active package -tasksfile="${TUE_SYSTEM_DIR}/.vscode/tasks.json" +tasksfile="${TUE_ENV_WS_DIR}/.vscode/tasks.json" if [[ ! -f "${tasksfile}" ]] # If user already has one, don't overwrite then tue-install-cp tasks.json "${tasksfile}"