mirror of
https://git.decapod.one/brethil/dotfiles
synced 2024-09-07 19:41:31 +02:00
zsh: add master->main dotfiles migration
This commit is contained in:
parent
28b1d9e2f7
commit
6d67506b9f
|
@ -9,15 +9,29 @@ export VIRTUAL_ENV_DISABLE_PROMPT=true
|
|||
|
||||
export PATH=$PATH:$HOME/bin
|
||||
|
||||
if [[ -d "$HOME/.cache/antibody" ]]; then
|
||||
# antibody migration cleanup
|
||||
rm -rf $HOME/.cache/antibody
|
||||
fi
|
||||
( # main branch migration
|
||||
set -euo pipefail
|
||||
cd $DOTFILES
|
||||
if [[ $(git branch --show-current) == "master" ]]; then
|
||||
echo "Migrating to main branch..."
|
||||
git fetch
|
||||
git stash
|
||||
git switch main
|
||||
git stash pop
|
||||
git branch -D master
|
||||
echo "Migration done!"
|
||||
fi
|
||||
)
|
||||
|
||||
if [[ ! -d $DOTFILES/antidote ]]; then
|
||||
git clone https://github.com/mattmc3/antidote.git ${DOTFILES}/antidote
|
||||
fi
|
||||
|
||||
if [[ -d "$HOME/.cache/antibody" ]]; then
|
||||
# antibody migration cleanup
|
||||
rm -rf $HOME/.cache/antibody
|
||||
fi
|
||||
|
||||
export ZSH_CACHE_DIR="${XDG_CACHE_HOME:-$HOME/.cache}/oh-my-zsh"
|
||||
[[ -d $ZSH_CACHE_DIR ]] || mkdir -p $ZSH_CACHE_DIR/completions
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user