From: tfheen Date: Mon, 11 Nov 2002 01:18:46 +0000 (+0000) Subject: do evil things to path X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4c9178a1747ee1915826d1cb584d9b4d09ac9304;p=dotfiles do evil things to path git-svn-id: file:///svn/tfheen/trunk/dotfiles@107 8da78d58-1cd3-0310-bee5-d77bd1b3e8bf --- diff --git a/environment b/environment index ed73189..b7988a4 100644 --- a/environment +++ b/environment @@ -6,6 +6,23 @@ for lsopt in -B --color=auto -FN; do ls $lsopt > /dev/null 2>&1 && LS_OPTIONS="$LS_OPTIONS $lsopt" done +setpathifdir () { + if [ -d "$1" ]; then + PATH="$1:${PATH%$1}" + fi +} + +appendpathifdir () { + if [ -d "$1" ]; then + PATH="${PATH%$1}:$1" + fi +} + +appendpathifdir /store/gnu/bin +appendpathifdir /store/bin +setpathifdir $HOME/bin +setpathifdir $HOME/usr/bin + CVSROOT=~/data/cvs EDITOR=emacs TZ=CET @@ -57,4 +74,4 @@ esac export LS_OPTIONS CVSROOT EDITOR TZ WWW_HOME LESSOPEN LESS RSYNC_RSH export CVS_RSH PILOTPORT PILOTRATE LANG DEBEMAIL CVSEDITOR ldlib -export HOSTNAME DOMAINNAME +export HOSTNAME DOMAINNAME PATH