install: `_bash-it-install-modify-profile()`

pull/2039/head
John D Pell 2022-01-28 16:37:25 -08:00 committed by John D Pell
parent d55adc610f
commit 4c5e87e545
1 changed files with 5 additions and 1 deletions

View File

@ -124,7 +124,11 @@ function _bash-it-install-modify-config() {
# backup/new by default
_bash-it-install-backup-new
fi
local choice profile_string=$'if [[ -s ~/.profile ]]; then\n\tsource ~/.profile\nfi\nif [[ $- == *"i"* && -s ~/.bashrc ]]; then\n\tsource ~/.bashrc\nfi'
_bash-it-install-modify-profile
}
function _bash-it-install-modify-profile() {
local choice profile_string=$'if [[ $- == *i* && -s ~/.bashrc ]]; then\n\tsource ~/.bashrc\nfi'
if [[ ! -f ~/.bash_profile ]]; then
printf '%s\n' "${profile_string}" > ~/.bash_profile
else