must let $PLAN9 be overrided in 9 and 9.rc
This commit is contained in:
parent
67075c3634
commit
3a9ee63519
3 changed files with 13 additions and 5 deletions
8
bin/9
8
bin/9
|
|
@ -1,7 +1,13 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
export PLAN9=/usr/local/plan9
|
export PLAN9=${PLAN9:-/usr/local/plan9}
|
||||||
|
case "$PATH" in
|
||||||
|
$PLAN9/bin:*)
|
||||||
|
;;
|
||||||
|
*)
|
||||||
export PATH=$PLAN9/bin:$PATH
|
export PATH=$PLAN9/bin:$PATH
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
case $# in
|
case $# in
|
||||||
[1-9]*)
|
[1-9]*)
|
||||||
|
|
|
||||||
1
bin/9.rc
1
bin/9.rc
|
|
@ -1,5 +1,6 @@
|
||||||
#!/usr/local/plan9/bin/rc
|
#!/usr/local/plan9/bin/rc
|
||||||
|
|
||||||
|
if(~ $#PLAN9 0)
|
||||||
PLAN9=/usr/local/plan9
|
PLAN9=/usr/local/plan9
|
||||||
if(! ~ $path(1) $PLAN9/bin)
|
if(! ~ $path(1) $PLAN9/bin)
|
||||||
path=($PLAN9/bin $path)
|
path=($PLAN9/bin $path)
|
||||||
|
|
|
||||||
|
|
@ -41,6 +41,7 @@ is a shell script that sets up a Plan 9 environment and runs
|
||||||
.I cmd .
|
.I cmd .
|
||||||
It sets
|
It sets
|
||||||
.B $PLAN9
|
.B $PLAN9
|
||||||
|
if necessary
|
||||||
and adds
|
and adds
|
||||||
.B $PLAN9/bin
|
.B $PLAN9/bin
|
||||||
to the beginning of
|
to the beginning of
|
||||||
|
|
@ -50,7 +51,7 @@ before running
|
||||||
.PP
|
.PP
|
||||||
If run with no arguments,
|
If run with no arguments,
|
||||||
.B 9
|
.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
|
.IR sh -style
|
||||||
shells using
|
shells using
|
||||||
.B .
|
.B .
|
||||||
|
|
@ -60,7 +61,7 @@ in order to make the current shell start running in the Plan 9 environment.
|
||||||
.I 9.rc
|
.I 9.rc
|
||||||
is the same as
|
is the same as
|
||||||
.I 9
|
.I 9
|
||||||
but written for the shell
|
but written for use by the shell
|
||||||
.IR rc (1).
|
.IR rc (1).
|
||||||
.SH EXAMPLES
|
.SH EXAMPLES
|
||||||
Search for greek in the password file:
|
Search for greek in the password file:
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue