3 PLAN9=`pwd` export PLAN9
4 PATH=/bin:/usr/bin:$PLAN9/bin:$PATH export PATH
6 echo "* Resetting $PLAN9/config"
10 if [ `uname` = Linux ]; then
11 # On Linux, we use the kernel version to decide whether
12 # to use pthreads or not. On 2.6 versions that aren't
13 # linking with NPTL by default, pretend to be an older kernel.
14 echo "* Running on Linux: checking for NPTL..."
15 gcc lib/linux-isnptl.c -lpthread
19 echo "SYSVERSION=2.6.x" >$PLAN9/config
21 echo " NPTL not found."
22 echo "SYSVERSION=2.4.x" >$PLAN9/config
27 if [ -f LOCAL.config ]; then
28 echo Using LOCAL.config options:
29 sed 's/^/ /' LOCAL.config
30 cat LOCAL.config >>config
33 echo "* Building mk..."
36 echo "* Building everything (be patient)..."
40 if [ ! -x $PLAN9/src/cmd/o.cleanname -o ! -x $PLAN9/src/cmd/acme/o.acme ]; then
41 echo "* Warning: not all binaries built successfully."
43 echo "* Installing everything..."
45 if [ ! -x $PLAN9/bin/cleanname -o ! -x $PLAN9/bin/acme ]; then
47 echo "* Warning: not all binaries built successfully."
49 if [ ! -x $PLAN9/bin/cleanname ]; then
51 echo "* Installation failed: $PLAN9/bin/cleanname does not exist."
54 echo "* Cleaning up..."
56 echo "* Renaming hard-coded /usr/local/plan9 paths..."
59 echo "* Building web manual..."
62 echo cd `pwd`';' mk man
65 if [ -x LOCAL.INSTALL ]; then
66 echo "* Running local modifications..."
73 echo "* Add these to your profile environment."
74 echo " PLAN9=$PLAN9 export PLAN9"
75 echo ' PATH=$PATH:$PLAN9/bin export PATH'
77 ) 2>&1 | tee install.log | awk -f $PLAN9/dist/isum.awk | tee install.sum