From d67e7254973aa49353adfa13972509e59f1c38d2 Mon Sep 17 00:00:00 2001 From: murgi Date: Tue, 5 Aug 2025 12:38:26 +0200 Subject: [PATCH] [ZSH] Add autopull for repo --- zsh/.zshrc | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/zsh/.zshrc b/zsh/.zshrc index 7b538f5..d265d83 100644 --- a/zsh/.zshrc +++ b/zsh/.zshrc @@ -19,6 +19,21 @@ if [[ -f ~/.zsh/.shared_config ]] ; then touch ~/.config/nvim/.shared_config fi +function update_dotfiles () { + cd ~/dotfiles + sleep 120 + fetch=$(git fetch) + if [[ -n "$fetch" ]]; then + git pull || echo "git pull of dotfiles failed, please see log." + fi +} + +if [ $shared_config -eq 0 ]; then + update_dotfiles &| +fi + + + # Load Antidote mkdir -p ${ZDOTDIR:-~}/.cache/zsh static_file=${ZDOTDIR:-~}/.cache/zsh/.zsh_plugins.zsh