bash: get rid of ~/.profile

This commit is contained in:
Fernando Schauenburg 2021-08-07 02:00:55 +02:00
parent 4ea59a778d
commit a52bc02768
3 changed files with 7 additions and 5 deletions

View file

@ -57,7 +57,6 @@ files/bashrc ${HOME}/.bashrc
files/bash_profile ${HOME}/.bash_profile files/bash_profile ${HOME}/.bash_profile
files/jupyter_custom.js ${HOME}/.jupyter/custom/custom.js files/jupyter_custom.js ${HOME}/.jupyter/custom/custom.js
files/jupyter_notebook.json ${HOME}/.jupyter/nbconfig/notebook.json files/jupyter_notebook.json ${HOME}/.jupyter/nbconfig/notebook.json
files/profile ${HOME}/.profile
files/ssh_config ${HOME}/.ssh/config files/ssh_config ${HOME}/.ssh/config
files/alacritty.yml ${XDG_CONFIG_HOME}/alacritty/alacritty.yml files/alacritty.yml ${XDG_CONFIG_HOME}/alacritty/alacritty.yml
files/gitconfig ${XDG_CONFIG_HOME}/git/config 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/tmux.conf ${XDG_CONFIG_HOME}/tmux/tmux.conf
files/init.vim ${XDG_CONFIG_HOME}/nvim/init.vim files/init.vim ${XDG_CONFIG_HOME}/nvim/init.vim
files/aliases.sh ${XDG_CONFIG_HOME}/shell/aliases.sh 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 files/solarized.sh ${XDG_CONFIG_HOME}/shell/solarized.sh
EOF EOF
) )
@ -155,7 +155,7 @@ task_gather_user_info() {
task_remove_bash_profile() { task_remove_bash_profile() {
heading "Remove pre-installed 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" file_absent "$HOME/$f"
done done
} }

View file

@ -1,6 +1,8 @@
#!/bin/bash #!/bin/bash
# Called by bash (1) on for login shells. Execute ~/.profile if present and # Called by bash (1) on for login shells.
# ~/.bashrc if shell is interactive. # Source:
[ -f "${HOME}/.profile" ] && source "${HOME}/.profile" # 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" [[ "$-" == *i* ]] && [ -f "${HOME}/.bashrc" ] && source "${HOME}/.bashrc"