Mercurial > index.cgi > dotfiles
changeset 6:f5b253e17e34
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.
author | huston@80426f53-59d1-405d-934b-f07cd76f4a1a |
---|---|
date | Mon, 13 Apr 2009 02:31:48 +0000 |
parents | 3d0de329a850 |
children | 1e8e782fccab |
files | .bash_profile |
diffstat | 1 files changed, 18 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- 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 +}