Mercurial > index.cgi > dotfiles
changeset 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 | 94cfcec3b5b6 |
children | b9896ae0733c |
files | .bash_aliases .bash_profile |
diffstat | 2 files changed, 48 insertions(+), 19 deletions(-) [+] |
line wrap: on
line diff
--- a/.bash_aliases Sun Aug 30 06:49:10 2009 +0000 +++ b/.bash_aliases Sun Aug 30 20:37:09 2009 +0000 @@ -1,14 +1,14 @@ -# Mac OS X specific -[[ `uname` == "Darwin" ]] && { - # DARWIN is used for the SSHFS mounts below - DARWIN="yes" - alias ls='ls -FG' -} +case `uname` in + Darwin) + # DARWIN is used for the SSHFS mounts below + DARWIN="yes" + alias ls='ls -FG' + ;; -# Linux specific -[[ `uname` == "Linux" ]] && { - alias ls='ls --color=auto -F' -} + Linux) + alias ls='ls --color=auto -F' + ;; +esac # SSH aliases alias dh='ssh srhuston.net' @@ -42,3 +42,5 @@ # Other alias condor_check="ls -lat /u/condor/hosts/*/log/MasterLog /scr/chimera0/condor/hosts/*/log/MasterLog" + +# vim: set filetype=sh :
--- a/.bash_profile Sun Aug 30 06:49:10 2009 +0000 +++ b/.bash_profile Sun Aug 30 20:37:09 2009 +0000 @@ -37,18 +37,45 @@ # 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. -[[ `uname` == "Darwin" ]] && { - STAT="stat -f %m -t %s $HOME/.dotfilets" - DATE="date -v -1m +%s" -} +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" + ;; -[[ `uname` == "Linux" ]] && { - STAT="stat -c %Y $HOME/.dotfilets" - DATE="date -d \"1 month ago\" +%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 $STAT` -lt `eval $DATE` ]] && { + `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 & +#} +