From 0d47c40fa03329a6ebb3d26ae0e391bd3a419f61 Mon Sep 17 00:00:00 2001
From: Andres Montano <andres.montano@tecnalia.com>
Date: Thu, 16 Jun 2022 11:32:02 +0200
Subject: [PATCH] Update dotfiles

---
 dotfiles/ros.bash | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/dotfiles/ros.bash b/dotfiles/ros.bash
index 7e25f21..40ee5e5 100644
--- a/dotfiles/ros.bash
+++ b/dotfiles/ros.bash
@@ -25,15 +25,15 @@ function sourcews(){
 
 # Source the current workspace
 function sourcethis(){
+    pwd_bck=${PWD}
     roshome && source ./devel/setup.${ext} && smon
+    cd ${pwd_bck}
 }
 
 # Automatic catkin build
 function cb() {
-    pwd_bck=${PWD}
     catkin build --summarize "$@"
-    sourcethis()
-    cd ${pwd_bck}
+    sourcethis
 }
 
 # Clean workspace (delete the generated folders, then catkin build)
-- 
GitLab