[ZSH] Fix autopull
This commit is contained in:
12
zsh/.zshrc
12
zsh/.zshrc
@@ -6,16 +6,14 @@
|
|||||||
[[ -f ~/.zsh/.virtual_env_config.zsh ]] && source ~/.zsh/.virtual_env_config.zsh
|
[[ -f ~/.zsh/.virtual_env_config.zsh ]] && source ~/.zsh/.virtual_env_config.zsh
|
||||||
[[ -f ~/.zsh/.local_config ]] && source ~/.zsh/.local_config
|
[[ -f ~/.zsh/.local_config ]] && source ~/.zsh/.local_config
|
||||||
|
|
||||||
function update_dotfiles () {
|
update_dotfiles() {
|
||||||
cd ~/dotfiles
|
cd ~/dotfiles || return
|
||||||
sleep 120
|
if git fetch --dry-run 2>&1 | grep -q .; then
|
||||||
fetch=$(git fetch)
|
git pull > /dev/null 2>&1
|
||||||
if [[ -n "$fetch" ]]; then
|
|
||||||
git pull || echo "git pull of dotfiles failed, please see log."
|
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
update_dotfiles &|
|
update_dotfiles 2>&1 &!
|
||||||
|
|
||||||
# Load Antidote
|
# Load Antidote
|
||||||
mkdir -p ${ZDOTDIR:-~}/.cache/zsh
|
mkdir -p ${ZDOTDIR:-~}/.cache/zsh
|
||||||
|
|||||||
Reference in New Issue
Block a user