From 3a9ee6351914b85db336d51b0e450f954d37d7a6 Mon Sep 17 00:00:00 2001 From: rsc Date: Fri, 14 Jan 2005 05:42:53 +0000 Subject: must let $PLAN9 be overrided in 9 and 9.rc --- bin/9 | 10 ++++++++-- bin/9.rc | 3 ++- 2 files changed, 10 insertions(+), 3 deletions(-) (limited to 'bin') diff --git a/bin/9 b/bin/9 index ff1a928d..33b0d89c 100755 --- a/bin/9 +++ b/bin/9 @@ -1,7 +1,13 @@ #!/bin/sh -export PLAN9=/usr/local/plan9 -export PATH=$PLAN9/bin:$PATH +export PLAN9=${PLAN9:-/usr/local/plan9} +case "$PATH" in +$PLAN9/bin:*) + ;; +*) + export PATH=$PLAN9/bin:$PATH + ;; +esac case $# in [1-9]*) diff --git a/bin/9.rc b/bin/9.rc index 1fb75d23..354976d3 100755 --- a/bin/9.rc +++ b/bin/9.rc @@ -1,6 +1,7 @@ #!/usr/local/plan9/bin/rc -PLAN9=/usr/local/plan9 +if(~ $#PLAN9 0) + PLAN9=/usr/local/plan9 if(! ~ $path(1) $PLAN9/bin) path=($PLAN9/bin $path) -- cgit v1.2.3