Mercurial > index.cgi > dotfiles
comparison .bash_profile @ 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 | 7e33b3191cf7 |
children | 1e8e782fccab |
comparison
equal
deleted
inserted
replaced
5:3d0de329a850 | 6:f5b253e17e34 |
---|---|
15 # export BASH_ENV=$HOME/.bashrc | 15 # export BASH_ENV=$HOME/.bashrc |
16 | 16 |
17 #if [ "X$SSH_AUTH_SOCK" = "X" ] ; then | 17 #if [ "X$SSH_AUTH_SOCK" = "X" ] ; then |
18 # eval `/usr/bin/ssh-agent` | 18 # eval `/usr/bin/ssh-agent` |
19 #fi | 19 #fi |
20 | |
21 # Check timestamp of the file '$HOME/.dotfilets'. If it's older than a week, | |
22 # run a 'svn st -u' and touch it; this way we check once per week to see if we | |
23 # forgot to pull down an updated version. I wish that command would change | |
24 # its exit value based on if there's updates or not, would be easier to | |
25 # automate this quietly. | |
26 | |
27 [[ `uname` == "Darwin" ]] && { | |
28 [[ ! -f $HOME/.dotfilets || \ | |
29 `stat -f %m -t %s .dotfilets` -lt `date -v -1w +%s` ]] && { | |
30 echo Dotfiles last checked over a week ago, running a status test. | |
31 svn st -u && touch $HOME/.dotfilets | |
32 } | |
33 } | |
34 | |
35 [[ `uname` == "Linux" ]] && { | |
36 # Linux tests here | |
37 } |