diff --git a/.profile b/.profile index b4ea839..f7f34ea 100644 --- a/.profile +++ b/.profile @@ -1,5 +1,3 @@ -. ~/.bashrc - if [ -d ~/git/dotfiles ] ; then bash ~/git/dotfiles/pull.sh rm ~/.bash* ~/.profile @@ -7,3 +5,5 @@ if [ -d ~/git/dotfiles ] ; then ln ./.bash* ../../ ln ./.profile ../../) fi + +. ~/.bashrc diff --git a/pull.sh b/pull.sh index df53865..cc73f38 100644 --- a/pull.sh +++ b/pull.sh @@ -1,10 +1,14 @@ #!/bin/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 && - git commit -am "Auto Update" - git push) + 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