Mercurial > index.cgi > dotfiles
comparison .bash_profile @ 78:10c8cd44bf0a
Changed 'svn' logic for monthly tests to 'hg'
| author | Steve Huston <huston@srhuston.net> |
|---|---|
| date | Sun, 21 Apr 2013 21:11:06 -0400 |
| parents | 1660b93d4220 |
| children | 4a09583afaac |
comparison
equal
deleted
inserted
replaced
| 77:6d3478364b5d | 78:10c8cd44bf0a |
|---|---|
| 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 version |
| 30 # (though it could be edited fairly easily for any other version control | 30 # control (and it could be edited fairly easily for any version control system |
| 31 # system I'm sure). We check the timestamp of the file '$HOME/.dotfilets'. | 31 # I'm sure). We check the timestamp of the file '$HOME/.dotfilets'. If it's |
| 32 # If it's older than a month, run a 'svn st -u' and touch it; this way we | 32 # older than a month, run a 'hg incoming' and touch it if nothing's changed; |
| 33 # check once per month to see if we forgot to pull down an updated version. | 33 # this way we check once per month to see if we forgot to pull down an updated |
| 34 # version and keep getting reminders until we do. | |
| 34 | 35 |
| 35 [[ ! -f $HOME/.dotfilets || \ | 36 [[ ! -f $HOME/.dotfilets || \ |
| 36 `eval $DFSTAT` -lt `eval $MDATE` ]] && { | 37 `eval $DFSTAT` -lt `eval $MDATE` ]] && { |
| 37 echo -n Dotfiles last checked over a month ago | 38 echo -n Dotfiles last checked over a month ago |
| 38 | 39 |
| 42 echo | 43 echo |
| 43 touch $HOME/.dotfilets | 44 touch $HOME/.dotfilets |
| 44 ;; | 45 ;; |
| 45 | 46 |
| 46 *) | 47 *) |
| 47 if ssh-add -l > /dev/null 2>&1 ; then | 48 if ssh-add -l > /dev/null 2>&1 ; then |
| 48 echo , running a status test. | 49 echo , running a status test. |
| 49 [[ -d $HOME/.svn ]] && { | 50 # hg incoming returns 0 if there's changes, 1 if there isn't |
| 50 echo | 51 # The goal will then be to only touch .dotfilets if there's no changes |
| 51 echo " *** WARNING: Still using subversion here ***" | 52 # upstream |
| 52 echo | 53 hg -q incoming || touch $HOME/.dotfilets & |
| 53 svn st -u && touch $HOME/.dotfilets & | 54 disown %+ |
| 54 disown %+ | |
| 55 } | |
| 56 else | 55 else |
| 57 echo , but no keys loaded yet - add SSH keys and retrigger test. | 56 echo , but no keys loaded yet - add SSH keys and retrigger test. |
| 58 fi | 57 fi |
| 59 esac | 58 esac |
| 60 } | 59 } |
| 60 | |
| 61 # Meanwhile, local changes are not costly and don't require a trip down the | |
| 62 # network, so we can afford to run them any time. | |
| 63 hg status |
