annotate .bash_profile @ 19:f65964738bab

Added Id tag to files, and svn propset svn:keywords as appropriate
author huston@80426f53-59d1-405d-934b-f07cd76f4a1a
date Wed, 25 Nov 2009 18:43:02 +0000
parents b9896ae0733c
children a6c93cf45e90
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
19
f65964738bab Added Id tag to files, and svn propset svn:keywords as appropriate
huston@80426f53-59d1-405d-934b-f07cd76f4a1a
parents: 16
diff changeset
1 # $Id$
f65964738bab Added Id tag to files, and svn propset svn:keywords as appropriate
huston@80426f53-59d1-405d-934b-f07cd76f4a1a
parents: 16
diff changeset
2 #
1
7e33b3191cf7 Merged in settings from home, and at the same time edited some of the
huston@80426f53-59d1-405d-934b-f07cd76f4a1a
parents: 0
diff changeset
3 # This file is sourced for interactive login shells, or
7e33b3191cf7 Merged in settings from home, and at the same time edited some of the
huston@80426f53-59d1-405d-934b-f07cd76f4a1a
parents: 0
diff changeset
4 # non-interactive shells with the --login option. So things which you
7e33b3191cf7 Merged in settings from home, and at the same time edited some of the
huston@80426f53-59d1-405d-934b-f07cd76f4a1a
parents: 0
diff changeset
5 # want to happen only on login shells should go here.
0
c78481cfb082 Initial checkin:
huston@80426f53-59d1-405d-934b-f07cd76f4a1a
parents:
diff changeset
6
c78481cfb082 Initial checkin:
huston@80426f53-59d1-405d-934b-f07cd76f4a1a
parents:
diff changeset
7 # Get the aliases and functions
c78481cfb082 Initial checkin:
huston@80426f53-59d1-405d-934b-f07cd76f4a1a
parents:
diff changeset
8 if [ -f ~/.bashrc ]; then
c78481cfb082 Initial checkin:
huston@80426f53-59d1-405d-934b-f07cd76f4a1a
parents:
diff changeset
9 . ~/.bashrc
c78481cfb082 Initial checkin:
huston@80426f53-59d1-405d-934b-f07cd76f4a1a
parents:
diff changeset
10 fi
c78481cfb082 Initial checkin:
huston@80426f53-59d1-405d-934b-f07cd76f4a1a
parents:
diff changeset
11
c78481cfb082 Initial checkin:
huston@80426f53-59d1-405d-934b-f07cd76f4a1a
parents:
diff changeset
12 # User specific environment and startup programs
c78481cfb082 Initial checkin:
huston@80426f53-59d1-405d-934b-f07cd76f4a1a
parents:
diff changeset
13
1
7e33b3191cf7 Merged in settings from home, and at the same time edited some of the
huston@80426f53-59d1-405d-934b-f07cd76f4a1a
parents: 0
diff changeset
14 # BASH_ENV is sourced for non-interactive shells; however, since we
7e33b3191cf7 Merged in settings from home, and at the same time edited some of the
huston@80426f53-59d1-405d-934b-f07cd76f4a1a
parents: 0
diff changeset
15 # source ~/.bashrc above I don't think we have to here also.
7e33b3191cf7 Merged in settings from home, and at the same time edited some of the
huston@80426f53-59d1-405d-934b-f07cd76f4a1a
parents: 0
diff changeset
16 # export BASH_ENV=$HOME/.bashrc
0
c78481cfb082 Initial checkin:
huston@80426f53-59d1-405d-934b-f07cd76f4a1a
parents:
diff changeset
17
7
1e8e782fccab Merge together the Linux and Darwin tests for the subversion status command,
huston@80426f53-59d1-405d-934b-f07cd76f4a1a
parents: 6
diff changeset
18 # These lines are helpful if you routinely might login without passing an
1e8e782fccab Merge together the Linux and Darwin tests for the subversion status command,
huston@80426f53-59d1-405d-934b-f07cd76f4a1a
parents: 6
diff changeset
19 # ssh-agent's authentication through. This way when you login, an agent is
1e8e782fccab Merge together the Linux and Darwin tests for the subversion status command,
huston@80426f53-59d1-405d-934b-f07cd76f4a1a
parents: 6
diff changeset
20 # exec'd for you (the corresponding lines in .bash_logout should kill the
1e8e782fccab Merge together the Linux and Darwin tests for the subversion status command,
huston@80426f53-59d1-405d-934b-f07cd76f4a1a
parents: 6
diff changeset
21 # agent when you logout, however they sometimes fail such as when killing your
1e8e782fccab Merge together the Linux and Darwin tests for the subversion status command,
huston@80426f53-59d1-405d-934b-f07cd76f4a1a
parents: 6
diff changeset
22 # shell without a proper logout or closing the connection). I left it here,
1e8e782fccab Merge together the Linux and Darwin tests for the subversion status command,
huston@80426f53-59d1-405d-934b-f07cd76f4a1a
parents: 6
diff changeset
23 # though I personally don't use/need it anymore.
1e8e782fccab Merge together the Linux and Darwin tests for the subversion status command,
huston@80426f53-59d1-405d-934b-f07cd76f4a1a
parents: 6
diff changeset
24
0
c78481cfb082 Initial checkin:
huston@80426f53-59d1-405d-934b-f07cd76f4a1a
parents:
diff changeset
25 #if [ "X$SSH_AUTH_SOCK" = "X" ] ; then
c78481cfb082 Initial checkin:
huston@80426f53-59d1-405d-934b-f07cd76f4a1a
parents:
diff changeset
26 # eval `/usr/bin/ssh-agent`
c78481cfb082 Initial checkin:
huston@80426f53-59d1-405d-934b-f07cd76f4a1a
parents:
diff changeset
27 #fi
6
f5b253e17e34 Added test for .dotfilets, to check the status against the svn repo once per
huston@80426f53-59d1-405d-934b-f07cd76f4a1a
parents: 1
diff changeset
28
7
1e8e782fccab Merge together the Linux and Darwin tests for the subversion status command,
huston@80426f53-59d1-405d-934b-f07cd76f4a1a
parents: 6
diff changeset
29 # This part is quite useful if you have your dotfiles stored in subversion
1e8e782fccab Merge together the Linux and Darwin tests for the subversion status command,
huston@80426f53-59d1-405d-934b-f07cd76f4a1a
parents: 6
diff changeset
30 # (though it could be edited fairly easily for any other version control
1e8e782fccab Merge together the Linux and Darwin tests for the subversion status command,
huston@80426f53-59d1-405d-934b-f07cd76f4a1a
parents: 6
diff changeset
31 # system I'm sure). We check the timestamp of the file '$HOME/.dotfilets'.
13
dacbbae5965c Added Ruby setup variables
huston@80426f53-59d1-405d-934b-f07cd76f4a1a
parents: 11
diff changeset
32 # If it's older than a month, run a 'svn st -u' and touch it; this way we
dacbbae5965c Added Ruby setup variables
huston@80426f53-59d1-405d-934b-f07cd76f4a1a
parents: 11
diff changeset
33 # check once per month to see if we forgot to pull down an updated version.
7
1e8e782fccab Merge together the Linux and Darwin tests for the subversion status command,
huston@80426f53-59d1-405d-934b-f07cd76f4a1a
parents: 6
diff changeset
34
1e8e782fccab Merge together the Linux and Darwin tests for the subversion status command,
huston@80426f53-59d1-405d-934b-f07cd76f4a1a
parents: 6
diff changeset
35 # First set $STAT and $DATE since the syntax of the commands is different
1e8e782fccab Merge together the Linux and Darwin tests for the subversion status command,
huston@80426f53-59d1-405d-934b-f07cd76f4a1a
parents: 6
diff changeset
36 # between Linux and Mac OS X. If this is run elsewhere, the eval will be
1e8e782fccab Merge together the Linux and Darwin tests for the subversion status command,
huston@80426f53-59d1-405d-934b-f07cd76f4a1a
parents: 6
diff changeset
37 # false and the test not done below, so it's safe to not bother checking for
1e8e782fccab Merge together the Linux and Darwin tests for the subversion status command,
huston@80426f53-59d1-405d-934b-f07cd76f4a1a
parents: 6
diff changeset
38 # zero-length variables on the test - it just won't run the svn status, so you
1e8e782fccab Merge together the Linux and Darwin tests for the subversion status command,
huston@80426f53-59d1-405d-934b-f07cd76f4a1a
parents: 6
diff changeset
39 # won't be prompted if there's newer files available in your repository.
6
f5b253e17e34 Added test for .dotfilets, to check the status against the svn repo once per
huston@80426f53-59d1-405d-934b-f07cd76f4a1a
parents: 1
diff changeset
40
15
fe83d9892ee3 Replaced tests with a 'case' in .bash_aliases
huston@80426f53-59d1-405d-934b-f07cd76f4a1a
parents: 13
diff changeset
41 case `uname` in
fe83d9892ee3 Replaced tests with a 'case' in .bash_aliases
huston@80426f53-59d1-405d-934b-f07cd76f4a1a
parents: 13
diff changeset
42 Darwin)
fe83d9892ee3 Replaced tests with a 'case' in .bash_aliases
huston@80426f53-59d1-405d-934b-f07cd76f4a1a
parents: 13
diff changeset
43 DFSTAT="stat -f %m -t %s $HOME/.dotfilets"
fe83d9892ee3 Replaced tests with a 'case' in .bash_aliases
huston@80426f53-59d1-405d-934b-f07cd76f4a1a
parents: 13
diff changeset
44 MDATE="date -v -1m +%s"
fe83d9892ee3 Replaced tests with a 'case' in .bash_aliases
huston@80426f53-59d1-405d-934b-f07cd76f4a1a
parents: 13
diff changeset
45 TDSTAT="stat -f %m -t %s $HOME/.todo"
fe83d9892ee3 Replaced tests with a 'case' in .bash_aliases
huston@80426f53-59d1-405d-934b-f07cd76f4a1a
parents: 13
diff changeset
46 HDATE="date -v -1h +%s"
fe83d9892ee3 Replaced tests with a 'case' in .bash_aliases
huston@80426f53-59d1-405d-934b-f07cd76f4a1a
parents: 13
diff changeset
47 ;;
6
f5b253e17e34 Added test for .dotfilets, to check the status against the svn repo once per
huston@80426f53-59d1-405d-934b-f07cd76f4a1a
parents: 1
diff changeset
48
15
fe83d9892ee3 Replaced tests with a 'case' in .bash_aliases
huston@80426f53-59d1-405d-934b-f07cd76f4a1a
parents: 13
diff changeset
49 Linux)
fe83d9892ee3 Replaced tests with a 'case' in .bash_aliases
huston@80426f53-59d1-405d-934b-f07cd76f4a1a
parents: 13
diff changeset
50 DFSTAT="stat -c %Y $HOME/.dotfilets"
fe83d9892ee3 Replaced tests with a 'case' in .bash_aliases
huston@80426f53-59d1-405d-934b-f07cd76f4a1a
parents: 13
diff changeset
51 MDATE="date -d \"1 month ago\" +%s"
fe83d9892ee3 Replaced tests with a 'case' in .bash_aliases
huston@80426f53-59d1-405d-934b-f07cd76f4a1a
parents: 13
diff changeset
52 TDSTAT="stat -c %Y $HOME/.todo"
fe83d9892ee3 Replaced tests with a 'case' in .bash_aliases
huston@80426f53-59d1-405d-934b-f07cd76f4a1a
parents: 13
diff changeset
53 HDATE="date -d \"1 hour ago\" +%s"
fe83d9892ee3 Replaced tests with a 'case' in .bash_aliases
huston@80426f53-59d1-405d-934b-f07cd76f4a1a
parents: 13
diff changeset
54 ;;
fe83d9892ee3 Replaced tests with a 'case' in .bash_aliases
huston@80426f53-59d1-405d-934b-f07cd76f4a1a
parents: 13
diff changeset
55 esac
7
1e8e782fccab Merge together the Linux and Darwin tests for the subversion status command,
huston@80426f53-59d1-405d-934b-f07cd76f4a1a
parents: 6
diff changeset
56
1e8e782fccab Merge together the Linux and Darwin tests for the subversion status command,
huston@80426f53-59d1-405d-934b-f07cd76f4a1a
parents: 6
diff changeset
57 [[ ! -f $HOME/.dotfilets || \
15
fe83d9892ee3 Replaced tests with a 'case' in .bash_aliases
huston@80426f53-59d1-405d-934b-f07cd76f4a1a
parents: 13
diff changeset
58 `eval $DFSTAT` -lt `eval $MDATE` ]] && {
16
b9896ae0733c Stole pretty PS1 and xterm title changing from BackTrack 4. Also added a
huston@80426f53-59d1-405d-934b-f07cd76f4a1a
parents: 15
diff changeset
59 echo -n Dotfiles last checked over a month ago
b9896ae0733c Stole pretty PS1 and xterm title changing from BackTrack 4. Also added a
huston@80426f53-59d1-405d-934b-f07cd76f4a1a
parents: 15
diff changeset
60
b9896ae0733c Stole pretty PS1 and xterm title changing from BackTrack 4. Also added a
huston@80426f53-59d1-405d-934b-f07cd76f4a1a
parents: 15
diff changeset
61 # Here we switch for hosts we don't want to check, just warn
b9896ae0733c Stole pretty PS1 and xterm title changing from BackTrack 4. Also added a
huston@80426f53-59d1-405d-934b-f07cd76f4a1a
parents: 15
diff changeset
62 case `hostname -s` in
b9896ae0733c Stole pretty PS1 and xterm title changing from BackTrack 4. Also added a
huston@80426f53-59d1-405d-934b-f07cd76f4a1a
parents: 15
diff changeset
63 bt)
b9896ae0733c Stole pretty PS1 and xterm title changing from BackTrack 4. Also added a
huston@80426f53-59d1-405d-934b-f07cd76f4a1a
parents: 15
diff changeset
64 echo
b9896ae0733c Stole pretty PS1 and xterm title changing from BackTrack 4. Also added a
huston@80426f53-59d1-405d-934b-f07cd76f4a1a
parents: 15
diff changeset
65 touch $HOME/.dotfilets
b9896ae0733c Stole pretty PS1 and xterm title changing from BackTrack 4. Also added a
huston@80426f53-59d1-405d-934b-f07cd76f4a1a
parents: 15
diff changeset
66 ;;
b9896ae0733c Stole pretty PS1 and xterm title changing from BackTrack 4. Also added a
huston@80426f53-59d1-405d-934b-f07cd76f4a1a
parents: 15
diff changeset
67 *)
b9896ae0733c Stole pretty PS1 and xterm title changing from BackTrack 4. Also added a
huston@80426f53-59d1-405d-934b-f07cd76f4a1a
parents: 15
diff changeset
68 echo , running a status test.
b9896ae0733c Stole pretty PS1 and xterm title changing from BackTrack 4. Also added a
huston@80426f53-59d1-405d-934b-f07cd76f4a1a
parents: 15
diff changeset
69 svn st -u && touch $HOME/.dotfilets &
b9896ae0733c Stole pretty PS1 and xterm title changing from BackTrack 4. Also added a
huston@80426f53-59d1-405d-934b-f07cd76f4a1a
parents: 15
diff changeset
70 esac
7
1e8e782fccab Merge together the Linux and Darwin tests for the subversion status command,
huston@80426f53-59d1-405d-934b-f07cd76f4a1a
parents: 6
diff changeset
71 }
15
fe83d9892ee3 Replaced tests with a 'case' in .bash_aliases
huston@80426f53-59d1-405d-934b-f07cd76f4a1a
parents: 13
diff changeset
72
fe83d9892ee3 Replaced tests with a 'case' in .bash_aliases
huston@80426f53-59d1-405d-934b-f07cd76f4a1a
parents: 13
diff changeset
73 # Work in progress - toodledo to ~/.todo
fe83d9892ee3 Replaced tests with a 'case' in .bash_aliases
huston@80426f53-59d1-405d-934b-f07cd76f4a1a
parents: 13
diff changeset
74 #[[ -f $HOME/.todo ]] && cat $HOME/.todo
fe83d9892ee3 Replaced tests with a 'case' in .bash_aliases
huston@80426f53-59d1-405d-934b-f07cd76f4a1a
parents: 13
diff changeset
75 #
fe83d9892ee3 Replaced tests with a 'case' in .bash_aliases
huston@80426f53-59d1-405d-934b-f07cd76f4a1a
parents: 13
diff changeset
76 #case `hostname -s` in
fe83d9892ee3 Replaced tests with a 'case' in .bash_aliases
huston@80426f53-59d1-405d-934b-f07cd76f4a1a
parents: 13
diff changeset
77 # xanadu|rapture)
fe83d9892ee3 Replaced tests with a 'case' in .bash_aliases
huston@80426f53-59d1-405d-934b-f07cd76f4a1a
parents: 13
diff changeset
78 # TOODLEDO_CMD="hotlist"
fe83d9892ee3 Replaced tests with a 'case' in .bash_aliases
huston@80426f53-59d1-405d-934b-f07cd76f4a1a
parents: 13
diff changeset
79 # ;;
fe83d9892ee3 Replaced tests with a 'case' in .bash_aliases
huston@80426f53-59d1-405d-934b-f07cd76f4a1a
parents: 13
diff changeset
80 #
fe83d9892ee3 Replaced tests with a 'case' in .bash_aliases
huston@80426f53-59d1-405d-934b-f07cd76f4a1a
parents: 13
diff changeset
81 # milton)
fe83d9892ee3 Replaced tests with a 'case' in .bash_aliases
huston@80426f53-59d1-405d-934b-f07cd76f4a1a
parents: 13
diff changeset
82 # TOODLEDO_CMD="tasks *Personal"
fe83d9892ee3 Replaced tests with a 'case' in .bash_aliases
huston@80426f53-59d1-405d-934b-f07cd76f4a1a
parents: 13
diff changeset
83 # ;;
fe83d9892ee3 Replaced tests with a 'case' in .bash_aliases
huston@80426f53-59d1-405d-934b-f07cd76f4a1a
parents: 13
diff changeset
84 #esac
fe83d9892ee3 Replaced tests with a 'case' in .bash_aliases
huston@80426f53-59d1-405d-934b-f07cd76f4a1a
parents: 13
diff changeset
85 #
fe83d9892ee3 Replaced tests with a 'case' in .bash_aliases
huston@80426f53-59d1-405d-934b-f07cd76f4a1a
parents: 13
diff changeset
86 #[[ ! -f $HOME/.todo || \
fe83d9892ee3 Replaced tests with a 'case' in .bash_aliases
huston@80426f53-59d1-405d-934b-f07cd76f4a1a
parents: 13
diff changeset
87 # `eval $TDSTAT` -lt `eval $HDATE` ]] && {
fe83d9892ee3 Replaced tests with a 'case' in .bash_aliases
huston@80426f53-59d1-405d-934b-f07cd76f4a1a
parents: 13
diff changeset
88 # echo "To-do list as of `date`" > $HOME/.todo
fe83d9892ee3 Replaced tests with a 'case' in .bash_aliases
huston@80426f53-59d1-405d-934b-f07cd76f4a1a
parents: 13
diff changeset
89 # echo "---------------------------------------------" >> $HOME/.todo
fe83d9892ee3 Replaced tests with a 'case' in .bash_aliases
huston@80426f53-59d1-405d-934b-f07cd76f4a1a
parents: 13
diff changeset
90 # toodledo tasks >> $HOME/.todo &
fe83d9892ee3 Replaced tests with a 'case' in .bash_aliases
huston@80426f53-59d1-405d-934b-f07cd76f4a1a
parents: 13
diff changeset
91 #}
fe83d9892ee3 Replaced tests with a 'case' in .bash_aliases
huston@80426f53-59d1-405d-934b-f07cd76f4a1a
parents: 13
diff changeset
92