local/bin/homeinit: Add safeguard against existing bashrc.

master
Pierre Neidhardt 2020-06-11 13:45:57 +02:00
parent 2f352b8cda
commit c3cc13e905
1 changed files with 5 additions and 3 deletions

View File

@ -208,7 +208,9 @@ else
fi
pushd ~/dotfiles
## .bash_profile may prevent .profile from being parsed, so we move it.
[ -e ~/.bash_profile ] && mv -v ~/.bash_profile ~/.bash_profile.old
for i in ~/.bash_profile ~/.bashrc; do
[ -e "$i" ] && mv -v "$i" "$i".old
done
stow -v . || exit 1
popd