linux - How to change directory to catkin workspace, then catkin_make, then go back -


currently, use following alias that:

alias ck='export ck_dir=`pwd` && cd ~/catkin_ws && catkin_make && cd $ck_dir' 

this works if catkin_make finish without error. there modification that

cd $ck_dir 

works if catkin_make failed?

thanks.

replace && semi-colon (;).

here tips remember:

&& = continue if previous command passed   || = continue if previous command failed ; = continue regardless of whether previous command passed or failed 

Comments

Popular posts from this blog

python - TypeError: start must be a integer -

c# - DevExpress RepositoryItemComboBox BackColor property ignored -

django - Creating multiple model instances in DRF3 -