Files
linux_tools/dot/bashrc
2023-05-10 10:41:21 -04:00

74 lines
2.0 KiB
Bash

# NTCNA V2X development
# Python and VirtualEnv
if [ -d ~/.local/bin ]; then
export PATH=~/.local/bin:$PATH
fi
if [ -x /usr/local/bin/virtualenvwrapper.sh ]; then
VIRTUALENVWRAPPER_PYTHON=/usr/bin/python3
source /usr/local/bin/virtualenvwrapper.sh
fi
# Android Studio
if [ -d ~/android-studio ]; then
export PATH=$PATH:~/android-studio/bin
fi
# Marben ASN.1 compiler
if [ -d /opt/marben/asnsdk/TCE-C_V80 ]; then
export ASNSDK_TCE_DIR=/opt/marben/asnsdk/TCE-C_V80/Compiler
export PATH=$ASNSDK_TCE_DIR/bin:$PATH
elif [ -d /opt/marben/asnsdk/TCE-C_V61 ]; then
export ASNSDK_TCE_DIR=/opt/marben/asnsdk/TCE-C_V61/Compiler
export PATH=$PATH:$ASNSDK_TCE_DIR/bin
fi
# ROS 1
if [ -f /opt/ros/noetic/setup.bash ]; then
# 20.04
source /opt/ros/noetic/setup.bash
export PYTHONPATH=$PYTHONPATH:$HOME/catkin_ws/devel/lib/python3/dist-packages
fi
# ROS 2
if [ -f /opt/ros/humble/setup.bash ]; then
# 22.04
source /opt/ros/humble/setup.bash
fi
# ProbeStar C/C++ library
if [ -d /usr/local/cnomicon ]; then
export PATH=$PATH:/usr/local/cnomicon/bin:/usr/local/cnomicon/sbin
fi
# NTCNA V2X C/C++ library
if [ -d /usr/local/cvehicle ]; then
export PATH=$PATH:/usr/local/cvehicle/bin:/usr/local/cvehicle/sbin
fi
# ProbeStar Python classes
if [ -d $HOME/Pynomicon/classes ]; then
export PYTHONPATH=$PYTHONPATH:$HOME/Pynomicon/classes
fi
# NTCNA V2X Python classes (install pycrate), ROS path above
if [ -d $HOME/PyVehicle/classes ]; then
export PYTHONPATH=$PYTHONPATH:$HOME/PyVehicle/classes:$HOME/PyVehicle/classes/j2735
fi
#export NTCNA_DVIHMI_PATH=$HOME/PyVehicle/ntcna_dvihmi
# Anaconda
if [ -d $HOME/anaconda3 ]; then
export PATH=$PATH:$HOME/anaconda3/bin
fi
# CARMA
if [ -d /usr/share/vcstool-completion ]; then
source /usr/share/vcstool-completion/vcs.bash
fi
parse_git_branch() {
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/ (\1)/'
}
# Add git branch and timestamp to bash commands
#export PS1="\t \033[01;32m\]\u@\h:\[\033[34m\]\w\[\033[33m\]\$(parse_git_branch)\[\033[00m\]$ "