mirror of
https://git.decapod.one/brethil/dotfiles
synced 2024-12-22 13:41:40 +01: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
|
export PATH=$PATH:$HOME/bin
|
||||||
|
|
||||||
if [[ -d "$HOME/.cache/antibody" ]]; then
|
( # main branch migration
|
||||||
# antibody migration cleanup
|
set -euo pipefail
|
||||||
rm -rf $HOME/.cache/antibody
|
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
|
fi
|
||||||
|
)
|
||||||
|
|
||||||
if [[ ! -d $DOTFILES/antidote ]]; then
|
if [[ ! -d $DOTFILES/antidote ]]; then
|
||||||
git clone https://github.com/mattmc3/antidote.git ${DOTFILES}/antidote
|
git clone https://github.com/mattmc3/antidote.git ${DOTFILES}/antidote
|
||||||
fi
|
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"
|
export ZSH_CACHE_DIR="${XDG_CACHE_HOME:-$HOME/.cache}/oh-my-zsh"
|
||||||
[[ -d $ZSH_CACHE_DIR ]] || mkdir -p $ZSH_CACHE_DIR/completions
|
[[ -d $ZSH_CACHE_DIR ]] || mkdir -p $ZSH_CACHE_DIR/completions
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user