X-Git-Url: https://git.distorted.org.uk/~mdw/profile/blobdiff_plain/4a01bd6dff68d1bfa9ee8c5ab534fac8038343a2..9a76b45ed10ba7f9fe89627dca1da0d1ab943d97:/bash_profile diff --git a/bash_profile b/bash_profile index 22931b0..c290aa9 100644 --- a/bash_profile +++ b/bash_profile @@ -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