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 fi
pushd ~/dotfiles pushd ~/dotfiles
## .bash_profile may prevent .profile from being parsed, so we move it. ## .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 stow -v . || exit 1
popd popd
@ -216,10 +218,10 @@ guix_install_profile() {
local profile local profile
local manifest local manifest
manifest=$HOME/.package-lists/guix-$i-manifest.scm manifest=$HOME/.package-lists/guix-$i-manifest.scm
if [ -f "$manifest"]; then if [ -f "$manifest" ]; then
warning "Manifest $manifest not found." warning "Manifest $manifest not found."
else else
if [ "$i" = "default"]; then if [ "$i" = "default" ]; then
~/.config/guix/current/bin/guix package --manifest="$manifest" --keep-failed --substitute-urls="$SUBSTITUTE_URLS" ~/.config/guix/current/bin/guix package --manifest="$manifest" --keep-failed --substitute-urls="$SUBSTITUTE_URLS"
. ~/.guix-profile/etc/profile . ~/.guix-profile/etc/profile
else else