[ZSH] Fix autopull
This commit is contained in:
13
zsh/.zshrc
13
zsh/.zshrc
@@ -19,16 +19,15 @@ if [[ -f ~/.zsh/.shared_config ]] ; then
|
|||||||
touch ~/.config/nvim/.shared_config
|
touch ~/.config/nvim/.shared_config
|
||||||
fi
|
fi
|
||||||
|
|
||||||
function update_dotfiles () {
|
update_dotfiles() {
|
||||||
cd ~/dotfiles
|
cd ~/dotfiles || return
|
||||||
fetch=$(git fetch)
|
if git fetch --dry-run 2>&1 | grep -q .; then
|
||||||
if [[ -n "$fetch" ]]; then
|
git pull > /dev/null 2>&1
|
||||||
git pull 2>& 1 > /dev/null
|
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
if [ $shared_config -eq 0 ]; then
|
if [ "$shared_config" -eq 0 ]; then
|
||||||
update_dotfiles &|
|
update_dotfiles 2>&1 &!
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user