# HG changeset patch # User huston@80426f53-59d1-405d-934b-f07cd76f4a1a # Date 1239589908 0 # Node ID f5b253e17e344b2ae6c31ccfbafd7f493c924678 # Parent 3d0de329a8502e15bb36e03c89011adb0d048e78 Added test for .dotfilets, to check the status against the svn repo once per week in a login shell. If one interrupts the test, you get the shell right away and the timestamp isn't updated so it is tested again next time. diff -r 3d0de329a850 -r f5b253e17e34 .bash_profile --- a/.bash_profile Sat Apr 11 21:24:58 2009 +0000 +++ b/.bash_profile Mon Apr 13 02:31:48 2009 +0000 @@ -17,3 +17,21 @@ #if [ "X$SSH_AUTH_SOCK" = "X" ] ; then # eval `/usr/bin/ssh-agent` #fi + +# Check timestamp of the file '$HOME/.dotfilets'. If it's older than a week, +# run a 'svn st -u' and touch it; this way we check once per week to see if we +# forgot to pull down an updated version. I wish that command would change +# its exit value based on if there's updates or not, would be easier to +# automate this quietly. + +[[ `uname` == "Darwin" ]] && { + [[ ! -f $HOME/.dotfilets || \ + `stat -f %m -t %s .dotfilets` -lt `date -v -1w +%s` ]] && { + echo Dotfiles last checked over a week ago, running a status test. + svn st -u && touch $HOME/.dotfilets + } +} + +[[ `uname` == "Linux" ]] && { +# Linux tests here +}