remove references to hardcoded /usr/local/plan9 where possible

This commit is contained in:
rsc 2005-01-11 17:49:03 +00:00
parent b8f742db85
commit 2c500adda2
11 changed files with 45 additions and 27 deletions

2
bin/"
View file

@ -1,4 +1,4 @@
#!/usr/local/plan9/bin/rc #!/usr/bin/env $PLAN9/bin/rc
fn text { fn text {
if(~ $winid [0-9]*) if(~ $winid [0-9]*)

2
bin/""
View file

@ -1,4 +1,4 @@
#!/usr/local/plan9/bin/rc #!/usr/bin/env $PLAN9/bin/rc
PROMPT='[^ ]*[%;$#][ ]+' PROMPT='[^ ]*[%;$#][ ]+'

View file

@ -1,4 +1,4 @@
#!/usr/local/plan9/bin/rc #!/usr/bin/env $PLAN9/bin/rc
# Click on an acme directory window and then execute Getdir # Click on an acme directory window and then execute Getdir

View file

@ -1,4 +1,4 @@
#!/usr/local/plan9/bin/rc #!/usr/bin/env $PLAN9/bin/rc
. $PLAN9/lib/acme.rc . $PLAN9/lib/acme.rc

View file

@ -1,4 +1,4 @@
#!/usr/local/plan9/bin/rc #!/usr/bin/env $PLAN9/bin/rc
# doctype: synthesize proper command line for troff # doctype: synthesize proper command line for troff
troff=troff troff=troff

48
bin/g
View file

@ -1,19 +1,37 @@
#!/usr/local/plan9/bin/rc #!/bin/sh
flags=() inflags=yes
while(! ~ $#* 1 && ~ $1 -*){ flags=""
flags=($flags $1) while [ $# != 0 -a $inflags = yes ]
shift do
} case "$1" in
-*)
flags="$flags $1"
shift
;;
-)
inflags=no
shift
;;
*)
inflags=no
;;
esac
done
switch($#*){ case $# in
case 0 0)
echo 'usage: g [flags] pattern [files]' >[1=2] echo 1>&2 'usage: g [flags] pattern [files]'
exit 1 exit 1
case 1 ;;
9grep -n $flags -- $1 *.[Cbchm] *.cc *.py *.tex *.ms *.java /dev/null \ 1)
|[2] {9grep -v '^(grep: can''t open \*|grep: \*\.)' >[1=2]; status=0} pattern="$1"
case * files=`/bin/ls *.[bcChm] *.cc *.py *.tex *.ms *.java 2>/dev/null`
9grep -n $flags -- $* /dev/null ;;
} *)
pattern="$1"
shift
files="$@"
esac
exec grep -n $flags -- "$pattern" $files /dev/null

View file

@ -1,7 +1,7 @@
#!/usr/local/plan9/bin/rc #!/usr/bin/env $PLAN9/bin/rc
# Usage: lookman key ... # Usage: lookman key ...
# prints out the names of all manual pages containing all the given keywords # prints out the names of all manual pages containing all the given keywords
index=/usr/local/plan9/man/lookman.index index=$PLAN9/man/lookman.index
t1=/tmp/look1.$pid t1=/tmp/look1.$pid
t2=/tmp/look2.$pid t2=/tmp/look2.$pid
fn sigexit sigint sighup sigterm{ fn sigexit sigint sighup sigterm{
@ -24,7 +24,7 @@ for(i in $*){
' > $t2 ' > $t2
mv $t2 $t1 mv $t2 $t1
} }
sort $t1 | sed 's;/usr/local/plan9/man/man[0-9]*/;; sort $t1 | sed 's;/.*/man/man[0-9]*/;;
s;(.*)\.(.*);man \2 \1 # \1(\2);' s;(.*)\.(.*);man \2 \1 # \1(\2);'
rm -f $t1 $t2 rm -f $t1 $t2
exit 0 exit 0

View file

@ -1,4 +1,4 @@
#!/usr/local/plan9/bin/rc #!/usr/bin/env $PLAN9/bin/rc
spellflags=() spellflags=()
deroffargs=() deroffargs=()

View file

@ -1,4 +1,4 @@
#!/usr/local/plan9/bin/rc #!/usr/bin/env $PLAN9/bin/rc
sym = 'threadmain?z sym = 'threadmain?z
p9main?z p9main?z

View file

@ -1,3 +1,3 @@
#!/bin/sh #!/bin/sh
exec /usr/local/plan9/bin/kill -CONT "$@" exec $PLAN9/bin/kill -CONT "$@"

View file

@ -1,3 +1,3 @@
#!/bin/sh #!/bin/sh
exec /usr/local/plan9/bin/kill -STOP "$@" exec $PLAN9/bin/kill -STOP "$@"