Mercurial > index.cgi > dotfiles
view .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 |
line wrap: on
line source
# .bash_profile # This file is sourced for interactive login shells, or # non-interactive shells with the --login option. So things which you # want to happen only on login shells should go here. # Get the aliases and functions if [ -f ~/.bashrc ]; then . ~/.bashrc fi # User specific environment and startup programs # BASH_ENV is sourced for non-interactive shells; however, since we # source ~/.bashrc above I don't think we have to here also. # export BASH_ENV=$HOME/.bashrc #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 }