Mercurial > index.cgi > dotfiles
annotate .bashrc @ 87:a835f8c36e93
Fixed PS1 & vimdiff
* PS1 had nonprintable characters in it, but bash didn't know that; so it
wrapped in all the wrong places.
* vimdiff was using different window placements than kdiff would use, leading
to much confusion. This way feels nicer, leaving the "good" output file at
the bottom.
author | Steve Huston <huston@astro.princeton.edu> |
---|---|
date | Wed, 01 May 2013 14:08:33 -0400 |
parents | c75fecccc3e5 |
children | 966c1e0b0a97 |
rev | line source |
---|---|
19
f65964738bab
Added Id tag to files, and svn propset svn:keywords as appropriate
huston@80426f53-59d1-405d-934b-f07cd76f4a1a
parents:
18
diff
changeset
|
1 # $Id$ |
f65964738bab
Added Id tag to files, and svn propset svn:keywords as appropriate
huston@80426f53-59d1-405d-934b-f07cd76f4a1a
parents:
18
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 shells which are interactive but not a |
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 # login shell; however, since it is also sourced within |
4
6ffd3fb73f7f
s/\~\//\$HOME\//g - There's possibly a nicer way to make sure tilde expansion
huston@80426f53-59d1-405d-934b-f07cd76f4a1a
parents:
3
diff
changeset
|
5 # $HOME/.bash_profile, the end result is that this file is sourced for all |
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
|
6 # shells. |
0 | 7 |
8 | |
9 # Source global definitions | |
10 if [ -f /etc/bashrc ]; then | |
30
ca6c77fe843b
* Whitespace (ugh)
huston@80426f53-59d1-405d-934b-f07cd76f4a1a
parents:
27
diff
changeset
|
11 . /etc/bashrc |
0 | 12 fi |
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
|
13 |
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 # User specific aliases and functions |
0 | 15 if [ -f $HOME/.bash_aliases ]; then |
30
ca6c77fe843b
* Whitespace (ugh)
huston@80426f53-59d1-405d-934b-f07cd76f4a1a
parents:
27
diff
changeset
|
16 . $HOME/.bash_aliases |
0 | 17 fi |
18 | |
3
072b183989e0
Merged in changes for the Mac, including the beginnings of platform
huston@80426f53-59d1-405d-934b-f07cd76f4a1a
parents:
1
diff
changeset
|
19 # |
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
|
20 # Environment variables |
3
072b183989e0
Merged in changes for the Mac, including the beginnings of platform
huston@80426f53-59d1-405d-934b-f07cd76f4a1a
parents:
1
diff
changeset
|
21 # |
70
15f662bc38c8
Changed logic for prompt; using 'su' and keeping PS1 now changes color to
huston@80426f53-59d1-405d-934b-f07cd76f4a1a
parents:
58
diff
changeset
|
22 #[[ "$PS1" ]] && export PS1='${debian_chroot:+($debian_chroot)}\e[01;32m\h\e[00m:\e[01;34m\w\e[00m\$ ' |
15f662bc38c8
Changed logic for prompt; using 'su' and keeping PS1 now changes color to
huston@80426f53-59d1-405d-934b-f07cd76f4a1a
parents:
58
diff
changeset
|
23 [[ "$PS1" ]] && { |
15f662bc38c8
Changed logic for prompt; using 'su' and keeping PS1 now changes color to
huston@80426f53-59d1-405d-934b-f07cd76f4a1a
parents:
58
diff
changeset
|
24 if [ -z "$DARWIN" ] ; then |
87
a835f8c36e93
Fixed PS1 & vimdiff
Steve Huston <huston@astro.princeton.edu>
parents:
85
diff
changeset
|
25 export PS1='${debian_chroot:+($debian_chroot)}\[\e[01;`case $EUID in 0) echo -n 31; ;; *) echo -n 32; ;; esac;`m\]\h\[\e[00m\]:\[\e[01;34m\]\w\[\e[00m\]\$ ' |
70
15f662bc38c8
Changed logic for prompt; using 'su' and keeping PS1 now changes color to
huston@80426f53-59d1-405d-934b-f07cd76f4a1a
parents:
58
diff
changeset
|
26 else |
87
a835f8c36e93
Fixed PS1 & vimdiff
Steve Huston <huston@astro.princeton.edu>
parents:
85
diff
changeset
|
27 export PS1='${debian_chroot:+($debian_chroot)}\[\e[01;`case $EUID in 0) echo "31\c"; ;; *) echo -n 32; ;; esac;`m\]\h\[\e[00m\]:\[\e[01;34m\]\w\[\e[00m\]\$ ' |
70
15f662bc38c8
Changed logic for prompt; using 'su' and keeping PS1 now changes color to
huston@80426f53-59d1-405d-934b-f07cd76f4a1a
parents:
58
diff
changeset
|
28 fi |
15f662bc38c8
Changed logic for prompt; using 'su' and keeping PS1 now changes color to
huston@80426f53-59d1-405d-934b-f07cd76f4a1a
parents:
58
diff
changeset
|
29 } |
3
072b183989e0
Merged in changes for the Mac, including the beginnings of platform
huston@80426f53-59d1-405d-934b-f07cd76f4a1a
parents:
1
diff
changeset
|
30 export PAGER=less |
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
|
31 export EDITOR=vim |
13
dacbbae5965c
Added Ruby setup variables
huston@80426f53-59d1-405d-934b-f07cd76f4a1a
parents:
9
diff
changeset
|
32 export RUBYLIB=$HOME/Installs/rubygems/lib |
dacbbae5965c
Added Ruby setup variables
huston@80426f53-59d1-405d-934b-f07cd76f4a1a
parents:
9
diff
changeset
|
33 export GEM_HOME=$HOME/Installs/rubygems/gems |
85
c75fecccc3e5
HG config changes:
Steve Huston <huston@astro.princeton.edu>
parents:
84
diff
changeset
|
34 export HOST=`hostname -s` |
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
|
35 |
16
b9896ae0733c
Stole pretty PS1 and xterm title changing from BackTrack 4. Also added a
huston@80426f53-59d1-405d-934b-f07cd76f4a1a
parents:
14
diff
changeset
|
36 # If this is an xterm set the title to user@host:dir |
51
44c36681ca0f
* Removed many double quotes from tests; they caused the tests to pass on
huston@80426f53-59d1-405d-934b-f07cd76f4a1a
parents:
49
diff
changeset
|
37 case $TERM in |
30
ca6c77fe843b
* Whitespace (ugh)
huston@80426f53-59d1-405d-934b-f07cd76f4a1a
parents:
27
diff
changeset
|
38 xterm*|rxvt*) |
16
b9896ae0733c
Stole pretty PS1 and xterm title changing from BackTrack 4. Also added a
huston@80426f53-59d1-405d-934b-f07cd76f4a1a
parents:
14
diff
changeset
|
39 PROMPT_COMMAND='echo -ne "\033]0;${USER}@${HOSTNAME}: ${PWD/$HOME/~}\007"' |
b9896ae0733c
Stole pretty PS1 and xterm title changing from BackTrack 4. Also added a
huston@80426f53-59d1-405d-934b-f07cd76f4a1a
parents:
14
diff
changeset
|
40 ;; |
30
ca6c77fe843b
* Whitespace (ugh)
huston@80426f53-59d1-405d-934b-f07cd76f4a1a
parents:
27
diff
changeset
|
41 *) |
16
b9896ae0733c
Stole pretty PS1 and xterm title changing from BackTrack 4. Also added a
huston@80426f53-59d1-405d-934b-f07cd76f4a1a
parents:
14
diff
changeset
|
42 ;; |
b9896ae0733c
Stole pretty PS1 and xterm title changing from BackTrack 4. Also added a
huston@80426f53-59d1-405d-934b-f07cd76f4a1a
parents:
14
diff
changeset
|
43 esac |
b9896ae0733c
Stole pretty PS1 and xterm title changing from BackTrack 4. Also added a
huston@80426f53-59d1-405d-934b-f07cd76f4a1a
parents:
14
diff
changeset
|
44 |
3
072b183989e0
Merged in changes for the Mac, including the beginnings of platform
huston@80426f53-59d1-405d-934b-f07cd76f4a1a
parents:
1
diff
changeset
|
45 # |
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
|
46 # Paths |
3
072b183989e0
Merged in changes for the Mac, including the beginnings of platform
huston@80426f53-59d1-405d-934b-f07cd76f4a1a
parents:
1
diff
changeset
|
47 # |
58
5ae5253cbcc1
* Started making updates for module usage, needs to be finished.
huston@80426f53-59d1-405d-934b-f07cd76f4a1a
parents:
51
diff
changeset
|
48 |
5ae5253cbcc1
* Started making updates for module usage, needs to be finished.
huston@80426f53-59d1-405d-934b-f07cd76f4a1a
parents:
51
diff
changeset
|
49 # A test for modules, to be implemented in time: |
5ae5253cbcc1
* Started making updates for module usage, needs to be finished.
huston@80426f53-59d1-405d-934b-f07cd76f4a1a
parents:
51
diff
changeset
|
50 # if [ "`type -t module`" == "function" ]; then |
5ae5253cbcc1
* Started making updates for module usage, needs to be finished.
huston@80426f53-59d1-405d-934b-f07cd76f4a1a
parents:
51
diff
changeset
|
51 # module load foo |
5ae5253cbcc1
* Started making updates for module usage, needs to be finished.
huston@80426f53-59d1-405d-934b-f07cd76f4a1a
parents:
51
diff
changeset
|
52 # fi |
5ae5253cbcc1
* Started making updates for module usage, needs to be finished.
huston@80426f53-59d1-405d-934b-f07cd76f4a1a
parents:
51
diff
changeset
|
53 |
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
|
54 # Standard-ish paths; some of these may be in place already, but if |
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
|
55 # they're not they should probably go near the front of the pack. |
3
072b183989e0
Merged in changes for the Mac, including the beginnings of platform
huston@80426f53-59d1-405d-934b-f07cd76f4a1a
parents:
1
diff
changeset
|
56 for P in /sbin /usr/sbin /usr/local/bin /usr/local/sbin \ |
32
29dfb30b069c
Added /usr/X11R6/bin to $PATH (Macs store some stuff there, Linux has it
huston@80426f53-59d1-405d-934b-f07cd76f4a1a
parents:
31
diff
changeset
|
57 /opt/local/bin /opt/local/sbin /usr/X11R6/bin; do |
30
ca6c77fe843b
* Whitespace (ugh)
huston@80426f53-59d1-405d-934b-f07cd76f4a1a
parents:
27
diff
changeset
|
58 if [ -d $P ]; then |
51
44c36681ca0f
* Removed many double quotes from tests; they caused the tests to pass on
huston@80426f53-59d1-405d-934b-f07cd76f4a1a
parents:
49
diff
changeset
|
59 [[ $PATH =~ (^|:)$P($|:) ]] || \ |
30
ca6c77fe843b
* Whitespace (ugh)
huston@80426f53-59d1-405d-934b-f07cd76f4a1a
parents:
27
diff
changeset
|
60 export PATH=${P}${PATH:+:$PATH} |
ca6c77fe843b
* Whitespace (ugh)
huston@80426f53-59d1-405d-934b-f07cd76f4a1a
parents:
27
diff
changeset
|
61 fi |
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
|
62 done |
0 | 63 |
3
072b183989e0
Merged in changes for the Mac, including the beginnings of platform
huston@80426f53-59d1-405d-934b-f07cd76f4a1a
parents:
1
diff
changeset
|
64 for M in /usr/local/share/man /usr/local/man /opt/local/share/man ; do |
30
ca6c77fe843b
* Whitespace (ugh)
huston@80426f53-59d1-405d-934b-f07cd76f4a1a
parents:
27
diff
changeset
|
65 if [ -d $M ]; then |
51
44c36681ca0f
* Removed many double quotes from tests; they caused the tests to pass on
huston@80426f53-59d1-405d-934b-f07cd76f4a1a
parents:
49
diff
changeset
|
66 [[ $MANPATH =~ (^|:)$M($|:) ]] || \ |
30
ca6c77fe843b
* Whitespace (ugh)
huston@80426f53-59d1-405d-934b-f07cd76f4a1a
parents:
27
diff
changeset
|
67 export MANPATH=${M}${MANPATH:+:$MANPATH} |
ca6c77fe843b
* Whitespace (ugh)
huston@80426f53-59d1-405d-934b-f07cd76f4a1a
parents:
27
diff
changeset
|
68 fi |
3
072b183989e0
Merged in changes for the Mac, including the beginnings of platform
huston@80426f53-59d1-405d-934b-f07cd76f4a1a
parents:
1
diff
changeset
|
69 done |
072b183989e0
Merged in changes for the Mac, including the beginnings of platform
huston@80426f53-59d1-405d-934b-f07cd76f4a1a
parents:
1
diff
changeset
|
70 |
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
|
71 # Local Perl install |
4
6ffd3fb73f7f
s/\~\//\$HOME\//g - There's possibly a nicer way to make sure tilde expansion
huston@80426f53-59d1-405d-934b-f07cd76f4a1a
parents:
3
diff
changeset
|
72 if [ -d $HOME/perl ]; then |
49
8d204a89b981
* Local Perl install paths weren't quite right - they assumed a link existed
huston@80426f53-59d1-405d-934b-f07cd76f4a1a
parents:
33
diff
changeset
|
73 if [ -d $HOME/perl/lib/perl5 ]; then |
51
44c36681ca0f
* Removed many double quotes from tests; they caused the tests to pass on
huston@80426f53-59d1-405d-934b-f07cd76f4a1a
parents:
49
diff
changeset
|
74 [[ $PERL5LIB =~ (^|:)$HOME/perl/lib/perl5($|:) ]] || \ |
49
8d204a89b981
* Local Perl install paths weren't quite right - they assumed a link existed
huston@80426f53-59d1-405d-934b-f07cd76f4a1a
parents:
33
diff
changeset
|
75 export PERL5LIB=$HOME/perl/lib/perl5${PERL5LIB:+:$PERL5LIB} |
8d204a89b981
* Local Perl install paths weren't quite right - they assumed a link existed
huston@80426f53-59d1-405d-934b-f07cd76f4a1a
parents:
33
diff
changeset
|
76 fi |
8d204a89b981
* Local Perl install paths weren't quite right - they assumed a link existed
huston@80426f53-59d1-405d-934b-f07cd76f4a1a
parents:
33
diff
changeset
|
77 |
8d204a89b981
* Local Perl install paths weren't quite right - they assumed a link existed
huston@80426f53-59d1-405d-934b-f07cd76f4a1a
parents:
33
diff
changeset
|
78 if [ -d $HOME/perl/lib64/perl5 ]; then |
51
44c36681ca0f
* Removed many double quotes from tests; they caused the tests to pass on
huston@80426f53-59d1-405d-934b-f07cd76f4a1a
parents:
49
diff
changeset
|
79 [[ $PERL5LIB =~ (^|:)$HOME/perl/lib64/perl5($|:) ]] || \ |
49
8d204a89b981
* Local Perl install paths weren't quite right - they assumed a link existed
huston@80426f53-59d1-405d-934b-f07cd76f4a1a
parents:
33
diff
changeset
|
80 export PERL5LIB=$HOME/perl/lib64/perl5${PERL5LIB:+:$PERL5LIB} |
8d204a89b981
* Local Perl install paths weren't quite right - they assumed a link existed
huston@80426f53-59d1-405d-934b-f07cd76f4a1a
parents:
33
diff
changeset
|
81 fi |
8d204a89b981
* Local Perl install paths weren't quite right - they assumed a link existed
huston@80426f53-59d1-405d-934b-f07cd76f4a1a
parents:
33
diff
changeset
|
82 |
8d204a89b981
* Local Perl install paths weren't quite right - they assumed a link existed
huston@80426f53-59d1-405d-934b-f07cd76f4a1a
parents:
33
diff
changeset
|
83 if [ -d $HOME/perl/lib/perl5/site_perl ]; then |
51
44c36681ca0f
* Removed many double quotes from tests; they caused the tests to pass on
huston@80426f53-59d1-405d-934b-f07cd76f4a1a
parents:
49
diff
changeset
|
84 [[ $PERL5LIB =~ (^|:)$HOME/perl/lib/perl5/site_perl($|:) ]] || \ |
49
8d204a89b981
* Local Perl install paths weren't quite right - they assumed a link existed
huston@80426f53-59d1-405d-934b-f07cd76f4a1a
parents:
33
diff
changeset
|
85 export PERL5LIB=$HOME/perl/lib/perl5/site_perl${PERL5LIB:+:$PERL5LIB} |
8d204a89b981
* Local Perl install paths weren't quite right - they assumed a link existed
huston@80426f53-59d1-405d-934b-f07cd76f4a1a
parents:
33
diff
changeset
|
86 fi |
8d204a89b981
* Local Perl install paths weren't quite right - they assumed a link existed
huston@80426f53-59d1-405d-934b-f07cd76f4a1a
parents:
33
diff
changeset
|
87 |
8d204a89b981
* Local Perl install paths weren't quite right - they assumed a link existed
huston@80426f53-59d1-405d-934b-f07cd76f4a1a
parents:
33
diff
changeset
|
88 if [ -d $HOME/perl/lib64/perl5/site_perl ]; then |
51
44c36681ca0f
* Removed many double quotes from tests; they caused the tests to pass on
huston@80426f53-59d1-405d-934b-f07cd76f4a1a
parents:
49
diff
changeset
|
89 [[ $PERL5LIB =~ (^|:)$HOME/perl/lib64/perl5/site_perl($|:) ]] || \ |
49
8d204a89b981
* Local Perl install paths weren't quite right - they assumed a link existed
huston@80426f53-59d1-405d-934b-f07cd76f4a1a
parents:
33
diff
changeset
|
90 export PERL5LIB=$HOME/perl/lib64/perl5/site_perl${PERL5LIB:+:$PERL5LIB} |
8d204a89b981
* Local Perl install paths weren't quite right - they assumed a link existed
huston@80426f53-59d1-405d-934b-f07cd76f4a1a
parents:
33
diff
changeset
|
91 fi |
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
|
92 |
30
ca6c77fe843b
* Whitespace (ugh)
huston@80426f53-59d1-405d-934b-f07cd76f4a1a
parents:
27
diff
changeset
|
93 if [ -d $HOME/perl/share/man ]; then |
51
44c36681ca0f
* Removed many double quotes from tests; they caused the tests to pass on
huston@80426f53-59d1-405d-934b-f07cd76f4a1a
parents:
49
diff
changeset
|
94 [[ $MANPATH =~ (^|:)$HOME/perl/share/man($|:) ]] || \ |
30
ca6c77fe843b
* Whitespace (ugh)
huston@80426f53-59d1-405d-934b-f07cd76f4a1a
parents:
27
diff
changeset
|
95 export MANPATH=$HOME/perl/share/man:${MANPATH:+$MANPATH} |
ca6c77fe843b
* Whitespace (ugh)
huston@80426f53-59d1-405d-934b-f07cd76f4a1a
parents:
27
diff
changeset
|
96 fi |
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
|
97 |
30
ca6c77fe843b
* Whitespace (ugh)
huston@80426f53-59d1-405d-934b-f07cd76f4a1a
parents:
27
diff
changeset
|
98 if [ -d $HOME/perl/bin ]; then |
51
44c36681ca0f
* Removed many double quotes from tests; they caused the tests to pass on
huston@80426f53-59d1-405d-934b-f07cd76f4a1a
parents:
49
diff
changeset
|
99 [[ $PATH =~ (^|:)$HOME/perl/bin($|:) ]] || \ |
30
ca6c77fe843b
* Whitespace (ugh)
huston@80426f53-59d1-405d-934b-f07cd76f4a1a
parents:
27
diff
changeset
|
100 export PATH=$HOME/perl/bin${PATH:+:$PATH} |
ca6c77fe843b
* Whitespace (ugh)
huston@80426f53-59d1-405d-934b-f07cd76f4a1a
parents:
27
diff
changeset
|
101 fi |
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
|
102 fi |
0 | 103 |
4
6ffd3fb73f7f
s/\~\//\$HOME\//g - There's possibly a nicer way to make sure tilde expansion
huston@80426f53-59d1-405d-934b-f07cd76f4a1a
parents:
3
diff
changeset
|
104 # Local install paths - install things to $HOME/Installs directories, and |
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
|
105 # they will automatically get the proper paths added. Most things |
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
|
106 # that use autoconf will do this with |
4
6ffd3fb73f7f
s/\~\//\$HOME\//g - There's possibly a nicer way to make sure tilde expansion
huston@80426f53-59d1-405d-934b-f07cd76f4a1a
parents:
3
diff
changeset
|
107 # './configure --prefix=$HOME/Installs' |
6ffd3fb73f7f
s/\~\//\$HOME\//g - There's possibly a nicer way to make sure tilde expansion
huston@80426f53-59d1-405d-934b-f07cd76f4a1a
parents:
3
diff
changeset
|
108 for D in $HOME/Installs/* ; do |
30
ca6c77fe843b
* Whitespace (ugh)
huston@80426f53-59d1-405d-934b-f07cd76f4a1a
parents:
27
diff
changeset
|
109 if [ -d $D/bin ]; then |
51
44c36681ca0f
* Removed many double quotes from tests; they caused the tests to pass on
huston@80426f53-59d1-405d-934b-f07cd76f4a1a
parents:
49
diff
changeset
|
110 [[ $PATH =~ (^|:)$D/bin($|:) ]] || \ |
30
ca6c77fe843b
* Whitespace (ugh)
huston@80426f53-59d1-405d-934b-f07cd76f4a1a
parents:
27
diff
changeset
|
111 export PATH=$D/bin${PATH:+:$PATH} |
ca6c77fe843b
* Whitespace (ugh)
huston@80426f53-59d1-405d-934b-f07cd76f4a1a
parents:
27
diff
changeset
|
112 fi |
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
|
113 |
30
ca6c77fe843b
* Whitespace (ugh)
huston@80426f53-59d1-405d-934b-f07cd76f4a1a
parents:
27
diff
changeset
|
114 if [ -d $D/share/man ]; then |
51
44c36681ca0f
* Removed many double quotes from tests; they caused the tests to pass on
huston@80426f53-59d1-405d-934b-f07cd76f4a1a
parents:
49
diff
changeset
|
115 [[ $MANPATH =~ (^|:)$D/share/man($|:) ]] || \ |
30
ca6c77fe843b
* Whitespace (ugh)
huston@80426f53-59d1-405d-934b-f07cd76f4a1a
parents:
27
diff
changeset
|
116 export MANPATH=$D/share/man:${MANPATH:+$MANPATH} |
ca6c77fe843b
* Whitespace (ugh)
huston@80426f53-59d1-405d-934b-f07cd76f4a1a
parents:
27
diff
changeset
|
117 fi |
ca6c77fe843b
* Whitespace (ugh)
huston@80426f53-59d1-405d-934b-f07cd76f4a1a
parents:
27
diff
changeset
|
118 |
ca6c77fe843b
* Whitespace (ugh)
huston@80426f53-59d1-405d-934b-f07cd76f4a1a
parents:
27
diff
changeset
|
119 if [ -d $D/man ]; then |
51
44c36681ca0f
* Removed many double quotes from tests; they caused the tests to pass on
huston@80426f53-59d1-405d-934b-f07cd76f4a1a
parents:
49
diff
changeset
|
120 [[ $MANPATH =~ (^|:)$D/man($|:) ]] || \ |
30
ca6c77fe843b
* Whitespace (ugh)
huston@80426f53-59d1-405d-934b-f07cd76f4a1a
parents:
27
diff
changeset
|
121 export MANPATH=$D/man:${MANPATH:+$MANPATH} |
ca6c77fe843b
* Whitespace (ugh)
huston@80426f53-59d1-405d-934b-f07cd76f4a1a
parents:
27
diff
changeset
|
122 fi |
0 | 123 done |
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
|
124 |
58
5ae5253cbcc1
* Started making updates for module usage, needs to be finished.
huston@80426f53-59d1-405d-934b-f07cd76f4a1a
parents:
51
diff
changeset
|
125 ## Add-ons for Intel compilers at work, and Condor |
5ae5253cbcc1
* Started making updates for module usage, needs to be finished.
huston@80426f53-59d1-405d-934b-f07cd76f4a1a
parents:
51
diff
changeset
|
126 #INTEL_ARCH='' |
5ae5253cbcc1
* Started making updates for module usage, needs to be finished.
huston@80426f53-59d1-405d-934b-f07cd76f4a1a
parents:
51
diff
changeset
|
127 #case `uname -p` in |
5ae5253cbcc1
* Started making updates for module usage, needs to be finished.
huston@80426f53-59d1-405d-934b-f07cd76f4a1a
parents:
51
diff
changeset
|
128 # i[3456]86) |
5ae5253cbcc1
* Started making updates for module usage, needs to be finished.
huston@80426f53-59d1-405d-934b-f07cd76f4a1a
parents:
51
diff
changeset
|
129 # INTEL_ARCH="ia32" |
5ae5253cbcc1
* Started making updates for module usage, needs to be finished.
huston@80426f53-59d1-405d-934b-f07cd76f4a1a
parents:
51
diff
changeset
|
130 # ;; |
5ae5253cbcc1
* Started making updates for module usage, needs to be finished.
huston@80426f53-59d1-405d-934b-f07cd76f4a1a
parents:
51
diff
changeset
|
131 # |
5ae5253cbcc1
* Started making updates for module usage, needs to be finished.
huston@80426f53-59d1-405d-934b-f07cd76f4a1a
parents:
51
diff
changeset
|
132 # x86_64) |
5ae5253cbcc1
* Started making updates for module usage, needs to be finished.
huston@80426f53-59d1-405d-934b-f07cd76f4a1a
parents:
51
diff
changeset
|
133 # INTEL_ARCH="intel64" |
5ae5253cbcc1
* Started making updates for module usage, needs to be finished.
huston@80426f53-59d1-405d-934b-f07cd76f4a1a
parents:
51
diff
changeset
|
134 # ;; |
5ae5253cbcc1
* Started making updates for module usage, needs to be finished.
huston@80426f53-59d1-405d-934b-f07cd76f4a1a
parents:
51
diff
changeset
|
135 #esac |
5ae5253cbcc1
* Started making updates for module usage, needs to be finished.
huston@80426f53-59d1-405d-934b-f07cd76f4a1a
parents:
51
diff
changeset
|
136 #[[ "$INTEL_ARCH" ]] && { |
5ae5253cbcc1
* Started making updates for module usage, needs to be finished.
huston@80426f53-59d1-405d-934b-f07cd76f4a1a
parents:
51
diff
changeset
|
137 # [[ $PATH =~ (^|:)/usr/peyton/intel ]] || { |
5ae5253cbcc1
* Started making updates for module usage, needs to be finished.
huston@80426f53-59d1-405d-934b-f07cd76f4a1a
parents:
51
diff
changeset
|
138 # [[ -f /usr/peyton/intel/11.0/bin/iccvars.sh ]] && \ |
5ae5253cbcc1
* Started making updates for module usage, needs to be finished.
huston@80426f53-59d1-405d-934b-f07cd76f4a1a
parents:
51
diff
changeset
|
139 # . /usr/peyton/intel/11.0/bin/iccvars.sh $INTEL_ARCH |
5ae5253cbcc1
* Started making updates for module usage, needs to be finished.
huston@80426f53-59d1-405d-934b-f07cd76f4a1a
parents:
51
diff
changeset
|
140 # [[ -f /usr/peyton/intel/11.0/bin/ifortvars.sh ]] && \ |
5ae5253cbcc1
* Started making updates for module usage, needs to be finished.
huston@80426f53-59d1-405d-934b-f07cd76f4a1a
parents:
51
diff
changeset
|
141 # . /usr/peyton/intel/11.0/bin/ifortvars.sh $INTEL_ARCH |
5ae5253cbcc1
* Started making updates for module usage, needs to be finished.
huston@80426f53-59d1-405d-934b-f07cd76f4a1a
parents:
51
diff
changeset
|
142 # } |
5ae5253cbcc1
* Started making updates for module usage, needs to be finished.
huston@80426f53-59d1-405d-934b-f07cd76f4a1a
parents:
51
diff
changeset
|
143 #} |
31
a93f5d5278f3
Fixed for Intel compilers 11.0
huston@80426f53-59d1-405d-934b-f07cd76f4a1a
parents:
30
diff
changeset
|
144 |
58
5ae5253cbcc1
* Started making updates for module usage, needs to be finished.
huston@80426f53-59d1-405d-934b-f07cd76f4a1a
parents:
51
diff
changeset
|
145 #if [ -f /u/condor/condor-setup.sh ]; then |
5ae5253cbcc1
* Started making updates for module usage, needs to be finished.
huston@80426f53-59d1-405d-934b-f07cd76f4a1a
parents:
51
diff
changeset
|
146 # [[ $PATH =~ (^|:)/u/condor/hosts/`hostname -s`/sbin($|:) ]] || { |
5ae5253cbcc1
* Started making updates for module usage, needs to be finished.
huston@80426f53-59d1-405d-934b-f07cd76f4a1a
parents:
51
diff
changeset
|
147 # export PATH=${PATH:+$PATH:}/u/condor/hosts/`hostname -s`/sbin |
5ae5253cbcc1
* Started making updates for module usage, needs to be finished.
huston@80426f53-59d1-405d-934b-f07cd76f4a1a
parents:
51
diff
changeset
|
148 # . /u/condor/condor-setup.sh |
5ae5253cbcc1
* Started making updates for module usage, needs to be finished.
huston@80426f53-59d1-405d-934b-f07cd76f4a1a
parents:
51
diff
changeset
|
149 # } |
5ae5253cbcc1
* Started making updates for module usage, needs to be finished.
huston@80426f53-59d1-405d-934b-f07cd76f4a1a
parents:
51
diff
changeset
|
150 #fi |
5
3d0de329a850
Merged in new lines for network environment at work
huston@80426f53-59d1-405d-934b-f07cd76f4a1a
parents:
4
diff
changeset
|
151 |
4
6ffd3fb73f7f
s/\~\//\$HOME\//g - There's possibly a nicer way to make sure tilde expansion
huston@80426f53-59d1-405d-934b-f07cd76f4a1a
parents:
3
diff
changeset
|
152 # Now make sure $HOME/bin is top of the list (or at least present) |
6ffd3fb73f7f
s/\~\//\$HOME\//g - There's possibly a nicer way to make sure tilde expansion
huston@80426f53-59d1-405d-934b-f07cd76f4a1a
parents:
3
diff
changeset
|
153 if [ -d $HOME/bin ]; then |
51
44c36681ca0f
* Removed many double quotes from tests; they caused the tests to pass on
huston@80426f53-59d1-405d-934b-f07cd76f4a1a
parents:
49
diff
changeset
|
154 [[ $PATH =~ (^|:)$HOME/bin($|:) ]] || \ |
30
ca6c77fe843b
* Whitespace (ugh)
huston@80426f53-59d1-405d-934b-f07cd76f4a1a
parents:
27
diff
changeset
|
155 export PATH=$HOME/bin${PATH:+:$PATH} |
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
|
156 fi |
4
6ffd3fb73f7f
s/\~\//\$HOME\//g - There's possibly a nicer way to make sure tilde expansion
huston@80426f53-59d1-405d-934b-f07cd76f4a1a
parents:
3
diff
changeset
|
157 |
6ffd3fb73f7f
s/\~\//\$HOME\//g - There's possibly a nicer way to make sure tilde expansion
huston@80426f53-59d1-405d-934b-f07cd76f4a1a
parents:
3
diff
changeset
|
158 # Last, make sure to end MANPATH with a ':' to force include of system paths |
6ffd3fb73f7f
s/\~\//\$HOME\//g - There's possibly a nicer way to make sure tilde expansion
huston@80426f53-59d1-405d-934b-f07cd76f4a1a
parents:
3
diff
changeset
|
159 # (some versions of man take care of this, but it doesn't hurt to have it |
6ffd3fb73f7f
s/\~\//\$HOME\//g - There's possibly a nicer way to make sure tilde expansion
huston@80426f53-59d1-405d-934b-f07cd76f4a1a
parents:
3
diff
changeset
|
160 # anyway) |
51
44c36681ca0f
* Removed many double quotes from tests; they caused the tests to pass on
huston@80426f53-59d1-405d-934b-f07cd76f4a1a
parents:
49
diff
changeset
|
161 [[ $MANPATH =~ :$ ]] || export MANPATH=$MANPATH: |
18
ebc3f864376c
Removed the LD_LIBRARY_PATH lines entirely since I've not seen any ill effects
huston@80426f53-59d1-405d-934b-f07cd76f4a1a
parents:
17
diff
changeset
|
162 |
ebc3f864376c
Removed the LD_LIBRARY_PATH lines entirely since I've not seen any ill effects
huston@80426f53-59d1-405d-934b-f07cd76f4a1a
parents:
17
diff
changeset
|
163 # Store MIBs in ~/mibs and they'll be added here. Can nest directories |
ebc3f864376c
Removed the LD_LIBRARY_PATH lines entirely since I've not seen any ill effects
huston@80426f53-59d1-405d-934b-f07cd76f4a1a
parents:
17
diff
changeset
|
164 # (they'll be searched). |
ebc3f864376c
Removed the LD_LIBRARY_PATH lines entirely since I've not seen any ill effects
huston@80426f53-59d1-405d-934b-f07cd76f4a1a
parents:
17
diff
changeset
|
165 if [ -d $HOME/mibs ]; then |
30
ca6c77fe843b
* Whitespace (ugh)
huston@80426f53-59d1-405d-934b-f07cd76f4a1a
parents:
27
diff
changeset
|
166 for D in `find $HOME/mibs -type d` ; do |
51
44c36681ca0f
* Removed many double quotes from tests; they caused the tests to pass on
huston@80426f53-59d1-405d-934b-f07cd76f4a1a
parents:
49
diff
changeset
|
167 [[ $MIBDIRS =~ (^\+|:)$D($|:) ]] || \ |
30
ca6c77fe843b
* Whitespace (ugh)
huston@80426f53-59d1-405d-934b-f07cd76f4a1a
parents:
27
diff
changeset
|
168 export MIBDIRS=${MIBDIRS:+$MIBDIRS:}$D |
ca6c77fe843b
* Whitespace (ugh)
huston@80426f53-59d1-405d-934b-f07cd76f4a1a
parents:
27
diff
changeset
|
169 done |
18
ebc3f864376c
Removed the LD_LIBRARY_PATH lines entirely since I've not seen any ill effects
huston@80426f53-59d1-405d-934b-f07cd76f4a1a
parents:
17
diff
changeset
|
170 |
51
44c36681ca0f
* Removed many double quotes from tests; they caused the tests to pass on
huston@80426f53-59d1-405d-934b-f07cd76f4a1a
parents:
49
diff
changeset
|
171 [[ $MIBDIRS =~ ^\+ ]] || export MIBDIRS=+$MIBDIRS |
30
ca6c77fe843b
* Whitespace (ugh)
huston@80426f53-59d1-405d-934b-f07cd76f4a1a
parents:
27
diff
changeset
|
172 export MIBS=ALL |
18
ebc3f864376c
Removed the LD_LIBRARY_PATH lines entirely since I've not seen any ill effects
huston@80426f53-59d1-405d-934b-f07cd76f4a1a
parents:
17
diff
changeset
|
173 fi |
33
f59f847377d7
* Added toodledo interfacing
huston@80426f53-59d1-405d-934b-f07cd76f4a1a
parents:
32
diff
changeset
|
174 |
f59f847377d7
* Added toodledo interfacing
huston@80426f53-59d1-405d-934b-f07cd76f4a1a
parents:
32
diff
changeset
|
175 # Display todo list |
f59f847377d7
* Added toodledo interfacing
huston@80426f53-59d1-405d-934b-f07cd76f4a1a
parents:
32
diff
changeset
|
176 [[ "$PS1" && -f $HOME/.todo ]] && cat $HOME/.todo |
f59f847377d7
* Added toodledo interfacing
huston@80426f53-59d1-405d-934b-f07cd76f4a1a
parents:
32
diff
changeset
|
177 |
f59f847377d7
* Added toodledo interfacing
huston@80426f53-59d1-405d-934b-f07cd76f4a1a
parents:
32
diff
changeset
|
178 [[ "$PS1" && -f $HOME/.todo && `eval $TDSTAT` -lt `eval $HDATE` ]] && { |
f59f847377d7
* Added toodledo interfacing
huston@80426f53-59d1-405d-934b-f07cd76f4a1a
parents:
32
diff
changeset
|
179 update_toodledo & |
f59f847377d7
* Added toodledo interfacing
huston@80426f53-59d1-405d-934b-f07cd76f4a1a
parents:
32
diff
changeset
|
180 disown %+ |
f59f847377d7
* Added toodledo interfacing
huston@80426f53-59d1-405d-934b-f07cd76f4a1a
parents:
32
diff
changeset
|
181 } |