mirror of
https://github.com/9fans/plan9port.git
synced 2025-01-12 11:10:07 +00:00
split in half
This commit is contained in:
parent
2214d4b6de
commit
df29f2cef6
1 changed files with 79 additions and 56 deletions
135
INSTALL
135
INSTALL
|
@ -1,5 +1,24 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
|
dobuild=true
|
||||||
|
doinstall=true
|
||||||
|
|
||||||
|
case "x$1" in
|
||||||
|
x)
|
||||||
|
;;
|
||||||
|
x-b)
|
||||||
|
dobuild=true
|
||||||
|
doinstall=false
|
||||||
|
;;
|
||||||
|
x-c)
|
||||||
|
dobuild=false
|
||||||
|
doinstall=true
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
echo 'usage: INSTALL [-b | -c]' 1>&2
|
||||||
|
exit 1
|
||||||
|
esac
|
||||||
|
|
||||||
PLAN9=`pwd` export PLAN9
|
PLAN9=`pwd` export PLAN9
|
||||||
PATH=/bin:/usr/bin:$PLAN9/bin:$PATH export PATH
|
PATH=/bin:/usr/bin:$PLAN9/bin:$PATH export PATH
|
||||||
|
|
||||||
|
@ -31,67 +50,71 @@ if [ -f LOCAL.config ]; then
|
||||||
fi
|
fi
|
||||||
|
|
||||||
cd src
|
cd src
|
||||||
if [ ! -x ../bin/mk ]; then
|
if $dobuild; then
|
||||||
echo "* Building mk..."
|
if [ ! -x ../bin/mk ]; then
|
||||||
../dist/buildmk 2>&1 | sed 's/^[+] //'
|
echo "* Building mk..."
|
||||||
fi
|
../dist/buildmk 2>&1 | sed 's/^[+] //'
|
||||||
if [ ! -x ../bin/mk ]; then
|
fi
|
||||||
echo "* Error: mk failed to build."
|
if [ ! -x ../bin/mk ]; then
|
||||||
exit 1
|
echo "* Error: mk failed to build."
|
||||||
fi
|
|
||||||
|
|
||||||
echo "* Building everything (be patient)..."
|
|
||||||
mk clean
|
|
||||||
mk libs-nuke
|
|
||||||
mk all || exit 1
|
|
||||||
if [ ! -x $PLAN9/src/cmd/o.cleanname -o ! -x $PLAN9/src/cmd/acme/o.acme ]; then
|
|
||||||
echo "* Warning: not all binaries built successfully."
|
|
||||||
fi
|
|
||||||
echo "* Installing everything..."
|
|
||||||
mk install || exit 1
|
|
||||||
if [ ! -x $PLAN9/bin/cleanname -o ! -x $PLAN9/bin/acme -o ! -x $PLAN9/bin/sam ]; then
|
|
||||||
echo " "
|
|
||||||
echo "* Warning: not all binaries built successfully."
|
|
||||||
fi
|
|
||||||
echo "* Cleaning up..."
|
|
||||||
mk clean
|
|
||||||
if [ ! -x $PLAN9/bin/cleanname -o ! -x $PLAN9/bin/sam ]; then
|
|
||||||
# Cleanname and sam are needed for moveplan9.sh and the man updates.
|
|
||||||
if [ ! -x $PLAN9/bin/cleanname ]; then
|
|
||||||
echo " "
|
|
||||||
echo "* Installation failed: $PLAN9/bin/cleanname does not exist."
|
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
if [ ! -x $PLAN9/bin/sam ]; then
|
|
||||||
echo " "
|
echo "* Building everything (be patient)..."
|
||||||
echo "* Installation failed: $PLAN9/bin/sam does not exist."
|
mk clean
|
||||||
exit 1
|
mk libs-nuke
|
||||||
|
mk all || exit 1
|
||||||
|
if [ ! -x $PLAN9/src/cmd/o.cleanname -o ! -x $PLAN9/src/cmd/acme/o.acme ]; then
|
||||||
|
echo "* Warning: not all binaries built successfully."
|
||||||
fi
|
fi
|
||||||
echo "* NOT renaming hard-coded /usr/local/plan9 paths."
|
echo "* Installing everything in $PLAN9/bin..."
|
||||||
echo "* NOT building web manual."
|
mk install || exit 1
|
||||||
else
|
if [ ! -x $PLAN9/bin/cleanname -o ! -x $PLAN9/bin/acme -o ! -x $PLAN9/bin/sam ]; then
|
||||||
echo "* Renaming hard-coded /usr/local/plan9 paths..."
|
echo " "
|
||||||
cd $PLAN9
|
echo "* Warning: not all binaries built successfully."
|
||||||
sh lib/moveplan9.sh
|
fi
|
||||||
echo "* Building web manual..."
|
echo "* Cleaning up..."
|
||||||
(
|
mk clean
|
||||||
cd $PLAN9/dist
|
|
||||||
echo cd `pwd`';' mk man
|
|
||||||
mk man
|
|
||||||
)
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -x LOCAL.INSTALL ]; then
|
if $doinstall; then
|
||||||
echo "* Running local modifications..."
|
if [ ! -x $PLAN9/bin/cleanname -o ! -x $PLAN9/bin/sam ]; then
|
||||||
echo cd `pwd`';' ./LOCAL.INSTALL
|
# Cleanname and sam are needed for moveplan9.sh and the man updates.
|
||||||
./LOCAL.INSTALL
|
if [ ! -x $PLAN9/bin/cleanname ]; then
|
||||||
|
echo " "
|
||||||
|
echo "* Installation failed: $PLAN9/bin/cleanname does not exist."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
if [ ! -x $PLAN9/bin/sam ]; then
|
||||||
|
echo " "
|
||||||
|
echo "* Installation failed: $PLAN9/bin/sam does not exist."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
echo "* NOT renaming hard-coded /usr/local/plan9 paths."
|
||||||
|
echo "* NOT building web manual."
|
||||||
|
else
|
||||||
|
echo "* Renaming hard-coded /usr/local/plan9 paths..."
|
||||||
|
cd $PLAN9
|
||||||
|
sh lib/moveplan9.sh
|
||||||
|
echo "* Building web manual..."
|
||||||
|
(
|
||||||
|
cd $PLAN9/dist
|
||||||
|
echo cd `pwd`';' mk man
|
||||||
|
mk man
|
||||||
|
)
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -x LOCAL.INSTALL ]; then
|
||||||
|
echo "* Running local modifications..."
|
||||||
|
echo cd `pwd`';' ./LOCAL.INSTALL
|
||||||
|
./LOCAL.INSTALL
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "* Done. "
|
||||||
|
echo " "
|
||||||
|
echo "* Add these to your profile environment."
|
||||||
|
echo " PLAN9=$PLAN9 export PLAN9"
|
||||||
|
echo ' PATH=$PATH:$PLAN9/bin export PATH'
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "* Done. "
|
|
||||||
echo " "
|
|
||||||
echo "* Add these to your profile environment."
|
|
||||||
echo " PLAN9=$PLAN9 export PLAN9"
|
|
||||||
echo ' PATH=$PATH:$PLAN9/bin export PATH'
|
|
||||||
|
|
||||||
) 2>&1 | tee install.log | awk -f $PLAN9/dist/isum.awk | tee install.sum
|
) 2>&1 | tee install.log | awk -f $PLAN9/dist/isum.awk | tee install.sum
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue