mirror of
https://github.com/9fans/plan9port.git
synced 2025-01-24 11:41:58 +00:00
Today's changes.
This commit is contained in:
parent
0023dde326
commit
cb27443abf
8 changed files with 87 additions and 6 deletions
31
NOTES
31
NOTES
|
@ -27,6 +27,25 @@ There are a few shell scripts already included in bin -- B, Bwait,
|
||||||
and samsave. Arguably these directories should be broken up by
|
and samsave. Arguably these directories should be broken up by
|
||||||
architecture so that
|
architecture so that
|
||||||
|
|
||||||
|
During the initial build of mk, you will likely see a message like
|
||||||
|
|
||||||
|
Assembler messages:
|
||||||
|
Error: can't open getcallerpc-386.s for reading
|
||||||
|
getcallerpc-386.s: No error
|
||||||
|
|
||||||
|
This is not a problem. The script tries to build getcallerpc
|
||||||
|
from assembly and then C. As long as one of them succeeds, great.
|
||||||
|
|
||||||
|
There are various directories that are not built by default.
|
||||||
|
They are listed in the BUGGERED definitions in src/mkfile and src/cmd/mkfile.
|
||||||
|
These aren't built because they're not quite ready for prime time.
|
||||||
|
Either they don't actually build or they haven't been very well tested.
|
||||||
|
|
||||||
|
As of this writing, factotum is buggered because it's not done yet,
|
||||||
|
and Venti and vac are buggered because they've hardly been tested
|
||||||
|
and are in a state of flux (they were both quite rewritten for the port).
|
||||||
|
|
||||||
|
|
||||||
* Writing programs
|
* Writing programs
|
||||||
|
|
||||||
The bin/ directory contains shell scripts 9a, 9c, 9l, and 9ar that mimic
|
The bin/ directory contains shell scripts 9a, 9c, 9l, and 9ar that mimic
|
||||||
|
@ -155,6 +174,13 @@ To check out from the anonymous CVS repository, use
|
||||||
|
|
||||||
When prompted for a password, just hit enter.
|
When prompted for a password, just hit enter.
|
||||||
|
|
||||||
|
If there is already a /usr/local/plan9 directory (from a previous
|
||||||
|
unpacking), remove it or move it out of the way. You need write
|
||||||
|
access to /usr/local in order to run the checkout, but after that
|
||||||
|
you'll only need write access to the plan9 subtree. I typically run
|
||||||
|
the initial checkout as root and then chown -R rsc plan9 so that
|
||||||
|
I can do things as rsc afterward.
|
||||||
|
|
||||||
From then on, when you want to update, you can do
|
From then on, when you want to update, you can do
|
||||||
|
|
||||||
cd /usr/local/plan9
|
cd /usr/local/plan9
|
||||||
|
@ -173,6 +199,11 @@ you can run
|
||||||
to generate the diff in a format that will be easy to apply.
|
to generate the diff in a format that will be easy to apply.
|
||||||
(You can also use this to see what you've changed.)
|
(You can also use this to see what you've changed.)
|
||||||
|
|
||||||
|
cvs diff -D20040101 -u
|
||||||
|
|
||||||
|
shows you differences txixt your tree and the repository
|
||||||
|
as of January 1, 2004.
|
||||||
|
|
||||||
Running the cvs commands in /usr/local/plan9 makes them
|
Running the cvs commands in /usr/local/plan9 makes them
|
||||||
apply to the whole tree. Running them in a subdirectory applies
|
apply to the whole tree. Running them in a subdirectory applies
|
||||||
only to the code rooted there in the code.
|
only to the code rooted there in the code.
|
||||||
|
|
3
TODO
3
TODO
|
@ -20,3 +20,6 @@
|
||||||
needs cleanup and release. should be easy to add ext2,
|
needs cleanup and release. should be easy to add ext2,
|
||||||
fat. ntfs harder but possible.
|
fat. ntfs harder but possible.
|
||||||
|
|
||||||
|
* win
|
||||||
|
need to make a real pty so that ^D etc. work.
|
||||||
|
|
||||||
|
|
14
bin/9l
14
bin/9l
|
@ -3,12 +3,24 @@
|
||||||
extralibs=-lm
|
extralibs=-lm
|
||||||
tag="${SYSNAME:-`uname`}-${OBJTYPE:-`uname -m`}"
|
tag="${SYSNAME:-`uname`}-${OBJTYPE:-`uname -m`}"
|
||||||
case "$tag" in
|
case "$tag" in
|
||||||
*FreeBSD*) ld=gcc ;;
|
*OpenBSD*) ld=gcc
|
||||||
|
extralibs="$extralibs -lpthread"
|
||||||
|
;;
|
||||||
*BSD*) ld=gcc ;;
|
*BSD*) ld=gcc ;;
|
||||||
*Linux*) ld=gcc ;;
|
*Linux*) ld=gcc ;;
|
||||||
*Darwin*) ld=gcc ;;
|
*Darwin*) ld=gcc ;;
|
||||||
*SunOS*) ld="${CC9:-cc} -g"
|
*SunOS*) ld="${CC9:-cc} -g"
|
||||||
extralibs="$extralibs -lrt -lpthread -lsocket -lnsl"
|
extralibs="$extralibs -lrt -lpthread -lsocket -lnsl"
|
||||||
|
# Record paths to shared libraries to avoid needing LD_LIBRARY_PATH
|
||||||
|
for i in "$@"
|
||||||
|
do
|
||||||
|
case "$i" in
|
||||||
|
-L*)
|
||||||
|
s=`echo $i | sed 's/-L/-R/'`
|
||||||
|
extralibs="$extralibs $s"
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
done
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
echo do not know how to link on "$tag" 1>&2
|
echo do not know how to link on "$tag" 1>&2
|
||||||
|
|
3
bin/awd
Executable file
3
bin/awd
Executable file
|
@ -0,0 +1,3 @@
|
||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
label `pwd`
|
19
bin/g
Executable file
19
bin/g
Executable file
|
@ -0,0 +1,19 @@
|
||||||
|
#!/usr/local/plan9/bin/rc
|
||||||
|
|
||||||
|
flags=()
|
||||||
|
while(! ~ $#* 1 && ~ $1 -*){
|
||||||
|
flags=($flags $1)
|
||||||
|
shift
|
||||||
|
}
|
||||||
|
|
||||||
|
switch($#*){
|
||||||
|
case 0
|
||||||
|
echo 'usage: g [flags] pattern [files]' >[1=2]
|
||||||
|
exit 1
|
||||||
|
case 1
|
||||||
|
9grep -n $flags -- $1 *.[Cbchm] *.cc *.py *.tex *.ms *.java /dev/null \
|
||||||
|
|[2] {9grep -v '^(grep: can''t open \*|grep: \*\.)' >[1=2]; status=0}
|
||||||
|
case *
|
||||||
|
9grep -n $flags -- $* /dev/null
|
||||||
|
}
|
||||||
|
|
13
bin/ps
13
bin/ps
|
@ -15,6 +15,7 @@ BEGIN{
|
||||||
state["I"] = "Idle";
|
state["I"] = "Idle";
|
||||||
state["J"] = "Jail";
|
state["J"] = "Jail";
|
||||||
state["R"] = "Ready";
|
state["R"] = "Ready";
|
||||||
|
state["O"] = "Running";
|
||||||
state["S"] = "Sleep";
|
state["S"] = "Sleep";
|
||||||
state["T"] = "Stopped";
|
state["T"] = "Stopped";
|
||||||
state["Z"] = "Zombie";
|
state["Z"] = "Zombie";
|
||||||
|
@ -65,8 +66,16 @@ function statestr(s)
|
||||||
}
|
}
|
||||||
!
|
!
|
||||||
|
|
||||||
/bin/ps -axww -o 'user,pid,start,time,vsz,stat,command' | sed 1d |
|
case "${SYSNAME:-`uname`}" in
|
||||||
awk -f /tmp/awk.xxx$$ | sort -n +1
|
SunOS)
|
||||||
|
/bin/ps -aA -o 'user,pid,stime,time,vsz,s,args' | sed 1d |
|
||||||
|
nawk -f /tmp/awk.xxx$$ | sort -n +1
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
/bin/ps -axww -o 'user,pid,start,time,vsz,stat,command' | sed 1d |
|
||||||
|
awk -f /tmp/awk.xxx$$ | sort -n +1
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
rm -f /tmp/awk.xxx$$
|
rm -f /tmp/awk.xxx$$
|
||||||
|
|
||||||
|
|
1
bin/web
1
bin/web
|
@ -10,6 +10,7 @@ plumb1()
|
||||||
;;
|
;;
|
||||||
*firebird*)
|
*firebird*)
|
||||||
$BROWSER -remote 'openURL('$i', new-window)'
|
$BROWSER -remote 'openURL('$i', new-window)'
|
||||||
|
;;
|
||||||
*firefox*)
|
*firefox*)
|
||||||
$BROWSER -remote 'openURL('$i', new-window)'
|
$BROWSER -remote 'openURL('$i', new-window)'
|
||||||
;;
|
;;
|
||||||
|
|
9
rcmain
9
rcmain
|
@ -10,15 +10,18 @@ case 1
|
||||||
prompt=($prompt ' ')
|
prompt=($prompt ' ')
|
||||||
}
|
}
|
||||||
if(~ $rcname ?.out) prompt=('broken! ' ' ')
|
if(~ $rcname ?.out) prompt=('broken! ' ' ')
|
||||||
if(flag p) path=/bin
|
if(flag p) path=(/bin)
|
||||||
if not{
|
if not{
|
||||||
finit
|
finit
|
||||||
if(~ $#path 0) . <{/bin/sh -c 'echo $PATH |
|
if(~ $#path 0) {
|
||||||
|
path=(/bin /usr/bin)
|
||||||
|
. <{sh -c 'echo $PATH |
|
||||||
sed "s/^/path=(''/; s/$/'')/; s/:/'' ''/g"'}
|
sed "s/^/path=(''/; s/$/'')/; s/:/'' ''/g"'}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
fn sigexit
|
fn sigexit
|
||||||
if(! ~ $#cflag 0){
|
if(! ~ $#cflag 0){
|
||||||
if(flag l && /bin/test -r $home/lib/profile) . $home/lib/profile
|
if(flag l && test -r $home/lib/profile) . $home/lib/profile
|
||||||
status=''
|
status=''
|
||||||
eval $cflag
|
eval $cflag
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue