]> err.no Git - dotfiles/commitdiff
only set lesspipe if we have lesspipe.sh
authortfheen <tfheen@8da78d58-1cd3-0310-bee5-d77bd1b3e8bf>
Thu, 26 Sep 2002 09:39:07 +0000 (09:39 +0000)
committertfheen <tfheen@8da78d58-1cd3-0310-bee5-d77bd1b3e8bf>
Thu, 26 Sep 2002 09:39:07 +0000 (09:39 +0000)
git-svn-id: file:///svn/tfheen/trunk/dotfiles@25 8da78d58-1cd3-0310-bee5-d77bd1b3e8bf

bashrc

diff --git a/bashrc b/bashrc
index caf6c69597bcbe127b7a6e8881850109ba02b831..0d4f0d88b26c9ebbc81b62355486d2bb93fd3338 100644 (file)
--- a/bashrc
+++ b/bashrc
@@ -19,6 +19,12 @@ export CVSROOT=~/data/cvs
 export EDITOR=/usr/bin/emacs
 export TZ=CET
 
+if which `domainname` 2>&1 >/dev/null; then
+    DOMAIN=`domainname`
+elif which `hostname` 2>&1 >/dev/null; then
+    DOMAIN=`hostname -d`
+fi
+
 LS_OPTIONS="$LS_OPTIONS -B"
 
 ATTR_FET="\[\033[1m\]"
@@ -36,14 +42,17 @@ case $TERM in
         export PS2=">$";;
 esac
 export WWW_HOME=http://localhost/~tfheen/services.html
-export LESSOPEN="|$HOME/bin/lesspipe.sh '%s'"
+if test -x "$HOME/bin/lesspipe.sh"; then
+    export LESSOPEN="|$HOME/bin/lesspipe.sh '%s'"
+fi
 export LESS="-m"
 export RSYNC_RSH="/usr/bin/ssh"
 export CVS_RSH=ssh
 export PILOTRATE=115200
 export PILOTPORT=/dev/tts/0
 alias mirror="wget --mirror --no-parent --convert-links -P $HOME/data/www-mirror "
-case `domainname` in
+
+case "$DOMAIN" in
     pvv)
         # Sigh, no locale here, at least not uniformly.
         ;;