Merge branch 'master' of git+ssh://metalzone.distorted.org.uk/~mdw/public-git/profile
[profile] / bash_profile
index 22931b0..c290aa9 100644 (file)
@@ -80,6 +80,10 @@ if [ -d /usr/local/plan9 ]; then
     $PLAN9/bin
 fi
 
+# --- Find whether a program exists ---
+
+__mdw_programp () { type -t >/dev/null "$1"; }
+
 # --- And the same for manual pages ---
 
 case "$MACHTIME" in
@@ -103,7 +107,7 @@ export QMAILINJECT=c
 export EDITOR=ed
 for ed in "emacs21 -nw" "emacs -nw" vi pico nano ae; do
   name=`echo $ed | sed 's/ .*$//'`
-  if type -t >/dev/null "$name"; then
+  if __mdw_programp "$name"; then
     EDITOR=$ed
     break
   fi
@@ -118,6 +122,8 @@ umask 002
 
 unset LANG LC_COLLATE
 
+__mdw_programp distcc && export CCACHE_PREFIX=distcc
+
 export TEXINPUTS=".:$HOME/lib/tex//:"
 
 __mdw_addto INFOPATH r $HOME/info /usr/info /usr/share/info /usr/local/info