From e80e4ae43e56977744c5f715fdbb895de6038233 Mon Sep 17 00:00:00 2001 From: Eason Tang Date: Fri, 30 May 2025 09:05:58 -0700 Subject: [PATCH] Add logic in .bash_profile so that the terminal can load the pco-devtools --- install_packages.sh | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/install_packages.sh b/install_packages.sh index f9a3585..79f3bce 100755 --- a/install_packages.sh +++ b/install_packages.sh @@ -184,6 +184,18 @@ unset rc EOF fi + if [[ ! -f ~/.bash_profile ]]; then + # Install skeleton .bashrc if one is not present + cat >> ~/.bashrc <<"EOF" +if [ -n "$BASH_VERSION" ]; then + # include .bashrc if it exists + if [ -f "$HOME/.bashrc" ]; then + . "$HOME/.bashrc" + fi +fi +EOF + fi + # Stop the annoying zsh default shell warning if [[ ! -f ~/.bash_profile ]] || ! grep -E BASH_SILENCE_DEPRECATION_WARNING ~/.bash_profile >/dev/null 2>&1 ; then echo "export BASH_SILENCE_DEPRECATION_WARNING=1" >> ~/.bash_profile