diff --git a/bootstrap b/bootstrap index 73f039c..845a87a 100755 --- a/bootstrap +++ b/bootstrap @@ -57,7 +57,6 @@ files/bashrc ${HOME}/.bashrc files/bash_profile ${HOME}/.bash_profile files/jupyter_custom.js ${HOME}/.jupyter/custom/custom.js files/jupyter_notebook.json ${HOME}/.jupyter/nbconfig/notebook.json -files/profile ${HOME}/.profile files/ssh_config ${HOME}/.ssh/config files/alacritty.yml ${XDG_CONFIG_HOME}/alacritty/alacritty.yml files/gitconfig ${XDG_CONFIG_HOME}/git/config @@ -69,6 +68,7 @@ files/python-startup.py ${XDG_CONFIG_HOME}/python/startup.py files/tmux.conf ${XDG_CONFIG_HOME}/tmux/tmux.conf files/init.vim ${XDG_CONFIG_HOME}/nvim/init.vim files/aliases.sh ${XDG_CONFIG_HOME}/shell/aliases.sh +files/profile.sh ${XDG_CONFIG_HOME}/shell/profile.sh files/solarized.sh ${XDG_CONFIG_HOME}/shell/solarized.sh EOF ) @@ -155,7 +155,7 @@ task_gather_user_info() { task_remove_bash_profile() { heading "Remove pre-installed bash profile" - for f in .bash_logout; do + for f in .bash_logout .profile; do file_absent "$HOME/$f" done } diff --git a/files/bash_profile b/files/bash_profile index c5cefcf..2d86810 100644 --- a/files/bash_profile +++ b/files/bash_profile @@ -1,6 +1,8 @@ #!/bin/bash -# Called by bash (1) on for login shells. Execute ~/.profile if present and -# ~/.bashrc if shell is interactive. -[ -f "${HOME}/.profile" ] && source "${HOME}/.profile" +# Called by bash (1) on for login shells. +# Source: +# 1. profile if present (XDG_CONFIG_HOME is not defined yet) +# 2. ~/.bashrc if shell is interactive. +[ -f "${HOME}/.config/shell/profile.sh" ] && source "${HOME}/.config/shell/profile.sh" [[ "$-" == *i* ]] && [ -f "${HOME}/.bashrc" ] && source "${HOME}/.bashrc" diff --git a/files/profile b/files/profile.sh similarity index 100% rename from files/profile rename to files/profile.sh