tmust let $PLAN9 be overrided in 9 and 9.rc - plan9port - [fork] Plan 9 from user space
 (HTM) git clone git://src.adamsgaard.dk/plan9port
 (DIR) Log
 (DIR) Files
 (DIR) Refs
 (DIR) README
 (DIR) LICENSE
       ---
 (DIR) commit 3a9ee6351914b85db336d51b0e450f954d37d7a6
 (DIR) parent 67075c3634c316ce9cc0e6fa88e65ca27503abc4
 (HTM) Author: rsc <devnull@localhost>
       Date:   Fri, 14 Jan 2005 05:42:53 +0000
       
       must let $PLAN9 be overrided in 9 and 9.rc
       
       Diffstat:
         M bin/9                               |      10 ++++++++--
         M bin/9.rc                            |       3 ++-
         M man/man1/9.1                        |       5 +++--
       
       3 files changed, 13 insertions(+), 5 deletions(-)
       ---
 (DIR) diff --git a/bin/9 b/bin/9
       t@@ -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]*)
 (DIR) diff --git a/bin/9.rc b/bin/9.rc
       t@@ -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)
        
 (DIR) diff --git a/man/man1/9.1 b/man/man1/9.1
       t@@ -41,6 +41,7 @@ is a shell script that sets up a Plan 9 environment and runs
        .I cmd .
        It sets
        .B $PLAN9
       +if necessary
        and adds
        .B $PLAN9/bin
        to the beginning of
       t@@ -50,7 +51,7 @@ before running
        .PP
        If run with no arguments,
        .B 9
       -does not do anything.  This is so that it can be invoked from
       +does not do anything, so it can be invoked from
        .IR sh -style
        shells using
        .B .
       t@@ -60,7 +61,7 @@ in order to make the current shell start running in the Plan 9 environment.
        .I 9.rc
        is the same as
        .I 9
       -but written for the shell
       +but written for use by the shell
        .IR rc (1).
        .SH EXAMPLES
        Search for greek in the password file: