Mercurial > index.cgi > dotfiles
view .bash_profile @ 15:fe83d9892ee3
Replaced tests with a 'case' in .bash_aliases
Added modeline in .bash_aliases to help vim see filetype
Started work on Toodledo -> ~/.todo; so far not bad, but the Ruby gem might be
buggy and cause problems. Idea is still somewhat sound, so instead of ripping
out the code I'll just comment around it for now.
author | huston@80426f53-59d1-405d-934b-f07cd76f4a1a |
---|---|
date | Sun, 30 Aug 2009 20:37:09 +0000 |
parents | dacbbae5965c |
children | b9896ae0733c |
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 # These lines are helpful if you routinely might login without passing an # ssh-agent's authentication through. This way when you login, an agent is # exec'd for you (the corresponding lines in .bash_logout should kill the # agent when you logout, however they sometimes fail such as when killing your # shell without a proper logout or closing the connection). I left it here, # though I personally don't use/need it anymore. #if [ "X$SSH_AUTH_SOCK" = "X" ] ; then # eval `/usr/bin/ssh-agent` #fi # This part is quite useful if you have your dotfiles stored in subversion # (though it could be edited fairly easily for any other version control # system I'm sure). We check the timestamp of the file '$HOME/.dotfilets'. # If it's older than a month, run a 'svn st -u' and touch it; this way we # check once per month to see if we forgot to pull down an updated version. # First set $STAT and $DATE since the syntax of the commands is different # between Linux and Mac OS X. If this is run elsewhere, the eval will be # false and the test not done below, so it's safe to not bother checking for # zero-length variables on the test - it just won't run the svn status, so you # won't be prompted if there's newer files available in your repository. case `uname` in Darwin) DFSTAT="stat -f %m -t %s $HOME/.dotfilets" MDATE="date -v -1m +%s" TDSTAT="stat -f %m -t %s $HOME/.todo" HDATE="date -v -1h +%s" ;; Linux) DFSTAT="stat -c %Y $HOME/.dotfilets" MDATE="date -d \"1 month ago\" +%s" TDSTAT="stat -c %Y $HOME/.todo" HDATE="date -d \"1 hour ago\" +%s" ;; esac [[ ! -f $HOME/.dotfilets || \ `eval $DFSTAT` -lt `eval $MDATE` ]] && { echo Dotfiles last checked over a month ago, running a status test. svn st -u && touch $HOME/.dotfilets & } # Work in progress - toodledo to ~/.todo #[[ -f $HOME/.todo ]] && cat $HOME/.todo # #case `hostname -s` in # xanadu|rapture) # TOODLEDO_CMD="hotlist" # ;; # # milton) # TOODLEDO_CMD="tasks *Personal" # ;; #esac # #[[ ! -f $HOME/.todo || \ # `eval $TDSTAT` -lt `eval $HDATE` ]] && { # echo "To-do list as of `date`" > $HOME/.todo # echo "---------------------------------------------" >> $HOME/.todo # toodledo tasks >> $HOME/.todo & #}