From: tfheen Date: Sun, 16 Jan 2005 22:38:11 +0000 (+0000) Subject: handle xterm through what is available, not where we are. X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=814942474db0b54a01bd23ef15263631e38b24c1;p=dotfiles handle xterm through what is available, not where we are. git-svn-id: file:///svn/tfheen/trunk/dotfiles@714 8da78d58-1cd3-0310-bee5-d77bd1b3e8bf --- diff --git a/environment b/environment index 697b115..c73c250 100644 --- a/environment +++ b/environment @@ -10,6 +10,16 @@ if [ `uname -s` = "FreeBSD" ] && alias | grep -q "ls="; then unalias ls fi +findcommand() { + notfound=1 + while [ "$notfound" -eq "1" ]; do + COMMAND=$(command -v "$1") + notfound=$? + shift + done + echo $COMMAND +} + blog () { pushd $(pwd) if [ ! -d "$HOME/blog" ]; then @@ -129,7 +139,7 @@ DEBEMAIL=tfheen@debian.org DEBFULLNAME="Tollef Fog Heen" CVSEDITOR=vi SVN_EDITOR=vi -XTERM=xterm +XTERM=$(findcommand pterm Eterm gnome-terminal xterm) PAGER=less GNUSTEP_USER_ROOT="$HOME/.GNUstep" @@ -187,16 +197,6 @@ case "$HOSTNAME" in esac case "$DOMAINNAME" in - idi.ntnu.no|stud.ntnu.no|*raw.no) - XTERM=Eterm - ;; - # Sigh, no locale here, at least not uniformly. -# case "$HOSTNAME" in -# arabella*) -# export LANG=no_NO -# ;; -# esac -# ;; samfundet*) mesg y EMAIL=tfheen@samfundet.no @@ -206,12 +206,6 @@ case "$DOMAINNAME" in ;; esac -case "$HOSTNAME" in - yiwaz*) - XTERM=Eterm - ;; -esac - removepathelem "\\." export LS_OPTIONS CVSROOT EDITOR TZ WWW_HOME LESSOPEN LESS RSYNC_RSH