Mercurial > index.cgi > dotfiles
comparison .bash_profile @ 30:ca6c77fe843b
* Whitespace (ugh)
* Test for presence of directories before adding them to paths
* Update Intel compilers to 11.0
| author | huston@80426f53-59d1-405d-934b-f07cd76f4a1a |
|---|---|
| date | Mon, 01 Feb 2010 19:33:19 +0000 |
| parents | a6c93cf45e90 |
| children | f59f847377d7 |
comparison
equal
deleted
inserted
replaced
| 29:b6e22d12945b | 30:ca6c77fe843b |
|---|---|
| 4 # non-interactive shells with the --login option. So things which you | 4 # non-interactive shells with the --login option. So things which you |
| 5 # want to happen only on login shells should go here. | 5 # want to happen only on login shells should go here. |
| 6 | 6 |
| 7 # Get the aliases and functions | 7 # Get the aliases and functions |
| 8 if [ -f ~/.bashrc ]; then | 8 if [ -f ~/.bashrc ]; then |
| 9 . ~/.bashrc | 9 . ~/.bashrc |
| 10 fi | 10 fi |
| 11 | 11 |
| 12 # User specific environment and startup programs | 12 # User specific environment and startup programs |
| 13 | 13 |
| 14 # BASH_ENV is sourced for non-interactive shells; however, since we | 14 # BASH_ENV is sourced for non-interactive shells; however, since we |
| 21 # agent when you logout, however they sometimes fail such as when killing your | 21 # agent when you logout, however they sometimes fail such as when killing your |
| 22 # shell without a proper logout or closing the connection). I left it here, | 22 # shell without a proper logout or closing the connection). I left it here, |
| 23 # though I personally don't use/need it anymore. | 23 # though I personally don't use/need it anymore. |
| 24 | 24 |
| 25 #if [ "X$SSH_AUTH_SOCK" = "X" ] ; then | 25 #if [ "X$SSH_AUTH_SOCK" = "X" ] ; then |
| 26 # eval `/usr/bin/ssh-agent` | 26 # eval `/usr/bin/ssh-agent` |
| 27 #fi | 27 #fi |
| 28 | 28 |
| 29 # This part is quite useful if you have your dotfiles stored in subversion | 29 # This part is quite useful if you have your dotfiles stored in subversion |
| 30 # (though it could be edited fairly easily for any other version control | 30 # (though it could be edited fairly easily for any other version control |
| 31 # system I'm sure). We check the timestamp of the file '$HOME/.dotfilets'. | 31 # system I'm sure). We check the timestamp of the file '$HOME/.dotfilets'. |
| 37 # false and the test not done below, so it's safe to not bother checking for | 37 # false and the test not done below, so it's safe to not bother checking for |
| 38 # zero-length variables on the test - it just won't run the svn status, so you | 38 # zero-length variables on the test - it just won't run the svn status, so you |
| 39 # won't be prompted if there's newer files available in your repository. | 39 # won't be prompted if there's newer files available in your repository. |
| 40 | 40 |
| 41 case `uname` in | 41 case `uname` in |
| 42 Darwin) | 42 Darwin) |
| 43 DFSTAT="stat -f %m -t %s $HOME/.dotfilets" | 43 DFSTAT="stat -f %m -t %s $HOME/.dotfilets" |
| 44 MDATE="date -v -1m +%s" | 44 MDATE="date -v -1m +%s" |
| 45 TDSTAT="stat -f %m -t %s $HOME/.todo" | 45 TDSTAT="stat -f %m -t %s $HOME/.todo" |
| 46 HDATE="date -v -1h +%s" | 46 HDATE="date -v -1h +%s" |
| 47 ;; | 47 ;; |
| 48 | 48 |
| 49 Linux) | 49 Linux) |
| 50 DFSTAT="stat -c %Y $HOME/.dotfilets" | 50 DFSTAT="stat -c %Y $HOME/.dotfilets" |
| 51 MDATE="date -d \"1 month ago\" +%s" | 51 MDATE="date -d \"1 month ago\" +%s" |
| 52 TDSTAT="stat -c %Y $HOME/.todo" | 52 TDSTAT="stat -c %Y $HOME/.todo" |
| 53 HDATE="date -d \"1 hour ago\" +%s" | 53 HDATE="date -d \"1 hour ago\" +%s" |
| 54 ;; | 54 ;; |
| 55 esac | 55 esac |
| 56 | 56 |
| 57 [[ ! -f $HOME/.dotfilets || \ | 57 [[ ! -f $HOME/.dotfilets || \ |
| 58 `eval $DFSTAT` -lt `eval $MDATE` ]] && { | 58 `eval $DFSTAT` -lt `eval $MDATE` ]] && { |
| 59 echo -n Dotfiles last checked over a month ago | 59 echo -n Dotfiles last checked over a month ago |
| 60 | 60 |
| 61 # Here we switch for hosts we don't want to check, just warn | 61 # Here we switch for hosts we don't want to check, just warn |
| 62 case `hostname -s` in | 62 case `hostname -s` in |
| 63 bt) | 63 bt) |
| 64 echo | 64 echo |
| 65 touch $HOME/.dotfilets | 65 touch $HOME/.dotfilets |
| 66 ;; | 66 ;; |
| 67 *) | 67 |
| 68 echo , running a status test. | 68 *) |
| 69 svn st -u && touch $HOME/.dotfilets & | 69 echo , running a status test. |
| 70 esac | 70 svn st -u && touch $HOME/.dotfilets & |
| 71 esac | |
| 71 } | 72 } |
| 72 | 73 |
| 73 # Work in progress - toodledo to ~/.todo | 74 # Work in progress - toodledo to ~/.todo |
| 74 #[[ -f $HOME/.todo ]] && cat $HOME/.todo | 75 #[[ -f $HOME/.todo ]] && cat $HOME/.todo |
| 75 # | 76 # |
| 76 #case `hostname -s` in | 77 #case `hostname -s` in |
| 77 # xanadu|rapture) | 78 # xanadu|rapture) |
| 78 # TOODLEDO_CMD="hotlist" | 79 # TOODLEDO_CMD="hotlist" |
| 79 # ;; | 80 # ;; |
| 80 # | 81 |
| 81 # milton) | 82 # milton) |
| 82 # TOODLEDO_CMD="tasks *Personal" | 83 # TOODLEDO_CMD="tasks *Personal" |
| 83 # ;; | 84 # ;; |
| 84 #esac | 85 #esac |
| 85 # | 86 # |
| 86 #[[ ! -f $HOME/.todo || \ | 87 #[[ ! -f $HOME/.todo || \ |
| 87 # `eval $TDSTAT` -lt `eval $HDATE` ]] && { | 88 # `eval $TDSTAT` -lt `eval $HDATE` ]] && { |
| 88 # echo "To-do list as of `date`" > $HOME/.todo | 89 # echo "To-do list as of `date`" > $HOME/.todo |
| 89 # echo "---------------------------------------------" >> $HOME/.todo | 90 # echo "---------------------------------------------" >> $HOME/.todo |
| 90 # toodledo tasks >> $HOME/.todo & | 91 # toodledo tasks >> $HOME/.todo & |
| 91 #} | 92 #} |
| 92 | 93 |
