[ZSH] Add autopull for repo
This commit is contained in:
15
zsh/.zshrc
15
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
|
||||
|
||||
Reference in New Issue
Block a user