Mercurial > index.cgi > dotfiles
comparison .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 |
comparison
equal
deleted
inserted
replaced
14:94cfcec3b5b6 | 15:fe83d9892ee3 |
---|---|
35 # between Linux and Mac OS X. If this is run elsewhere, the eval will be | 35 # between Linux and Mac OS X. If this is run elsewhere, the eval will be |
36 # false and the test not done below, so it's safe to not bother checking for | 36 # false and the test not done below, so it's safe to not bother checking for |
37 # zero-length variables on the test - it just won't run the svn status, so you | 37 # zero-length variables on the test - it just won't run the svn status, so you |
38 # won't be prompted if there's newer files available in your repository. | 38 # won't be prompted if there's newer files available in your repository. |
39 | 39 |
40 [[ `uname` == "Darwin" ]] && { | 40 case `uname` in |
41 STAT="stat -f %m -t %s $HOME/.dotfilets" | 41 Darwin) |
42 DATE="date -v -1m +%s" | 42 DFSTAT="stat -f %m -t %s $HOME/.dotfilets" |
43 } | 43 MDATE="date -v -1m +%s" |
44 TDSTAT="stat -f %m -t %s $HOME/.todo" | |
45 HDATE="date -v -1h +%s" | |
46 ;; | |
44 | 47 |
45 [[ `uname` == "Linux" ]] && { | 48 Linux) |
46 STAT="stat -c %Y $HOME/.dotfilets" | 49 DFSTAT="stat -c %Y $HOME/.dotfilets" |
47 DATE="date -d \"1 month ago\" +%s" | 50 MDATE="date -d \"1 month ago\" +%s" |
48 } | 51 TDSTAT="stat -c %Y $HOME/.todo" |
52 HDATE="date -d \"1 hour ago\" +%s" | |
53 ;; | |
54 esac | |
49 | 55 |
50 [[ ! -f $HOME/.dotfilets || \ | 56 [[ ! -f $HOME/.dotfilets || \ |
51 `eval $STAT` -lt `eval $DATE` ]] && { | 57 `eval $DFSTAT` -lt `eval $MDATE` ]] && { |
52 echo Dotfiles last checked over a month ago, running a status test. | 58 echo Dotfiles last checked over a month ago, running a status test. |
53 svn st -u && touch $HOME/.dotfilets & | 59 svn st -u && touch $HOME/.dotfilets & |
54 } | 60 } |
61 | |
62 # Work in progress - toodledo to ~/.todo | |
63 #[[ -f $HOME/.todo ]] && cat $HOME/.todo | |
64 # | |
65 #case `hostname -s` in | |
66 # xanadu|rapture) | |
67 # TOODLEDO_CMD="hotlist" | |
68 # ;; | |
69 # | |
70 # milton) | |
71 # TOODLEDO_CMD="tasks *Personal" | |
72 # ;; | |
73 #esac | |
74 # | |
75 #[[ ! -f $HOME/.todo || \ | |
76 # `eval $TDSTAT` -lt `eval $HDATE` ]] && { | |
77 # echo "To-do list as of `date`" > $HOME/.todo | |
78 # echo "---------------------------------------------" >> $HOME/.todo | |
79 # toodledo tasks >> $HOME/.todo & | |
80 #} | |
81 |