diff --git a/bash-conf-home/.bash_profile b/bash-conf-home/.bash_profile index ebf2443..844f17b 100644 --- a/bash-conf-home/.bash_profile +++ b/bash-conf-home/.bash_profile @@ -2,10 +2,21 @@ # ~/.bash_profile # -scripts="${HOME}/dotfiles/scripts" -if [[ -d "${scripts}" ]]; then - export PATH="${PATH}:${scripts}" -fi -unset scripts +# KEEP THIS! +# important for window manager and menu app (fuzzel, rofi, ..) +# to find scripts and utilities -export PATH="$PATH:$HOME/repos/jlink" +export_paths=("${HOME}/dotfiles/scripts") +export_paths+=("$HOME/tools/jlink") + +for entry in ${export_paths[@]}; do + if ! [[ -d "${entry}" ]]; then + continue + fi + if [[ "$PATH" == *"${entry}"* ]]; then + continue + fi + export PATH="${PATH}:${entry}" +done + +unset export_paths diff --git a/bash-conf-work/.bash_profile b/bash-conf-work/.bash_profile index b752cb3..726d5ee 100644 --- a/bash-conf-work/.bash_profile +++ b/bash-conf-work/.bash_profile @@ -2,15 +2,25 @@ # ~/.bash_profile # -# extend paths -scripts="${HOME}/dotfiles/scripts" -if [[ -d "${scripts}" ]]; then - export PATH="${PATH}:${scripts}" -fi -unset scripts +# KEEP THIS! +# important for window manager and menu app (fuzzel, rofi, ..) +# to find scripts and utilities -export PATH="$PATH:$HOME/tools/Xilinx/Vivado/2021.1/bin" -export PATH="$PATH:$HOME/tools/jlink_linux" +export_paths=("${HOME}/dotfiles/scripts") +export_paths+=("$HOME/tools/Xilinx/Vivado/2021.1/bin") +export_paths+=("$HOME/tools/jlink") + +for entry in ${export_paths[@]}; do + if ! [[ -d "${entry}" ]]; then + continue + fi + if [[ "$PATH" == *"${entry}"* ]]; then + continue + fi + export PATH="${PATH}:${entry}" +done + +unset export_paths # vivado license export XILINXD_LICENSE_FILE=26140@aberdeen.zhaw.ch diff --git a/bashrc/.bashrc b/bashrc/.bashrc index 1a6c40b..af9c847 100644 --- a/bashrc/.bashrc +++ b/bashrc/.bashrc @@ -111,3 +111,5 @@ done if [[ -t 0 && $- = *i* ]]; then stty -ixon fi + +source $HOME/.bash_profile