dotfiles/pull.sh
2023-06-12 14:30:20 -04:00

16 lines
359 B
Bash

#!/usr/bin/env bash
if [[ -d ~/git/dotfiles ]] ; then
git config --global user.email "matt@nelim.org"
git config --global user.name "matt1432"
(cd ~/git/dotfiles
git config pull.rebase false
git pull
if [[ $(sed 's/.* //' ~/git/dotfiles/.git/FETCH_HEAD) = "git.nelim.org:matt1432/dotfiles" ]] ; then
git commit -am "Auto Update"
git push
fi)
fi