aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Saveliev <svinota.saveliev@gmail.com>2011-06-02 09:28:23 -0400
committerRuss Cox <rsc@swtch.com>2011-06-02 09:28:23 -0400
commit89ec3cde42c7b1bb44e6a7b39f73dbec5e892d04 (patch)
treee21e1db27c87aa6c3951cfef75f3455fab75686a
parent363062eab4dfbd7d484862fe35b73962caa635ef (diff)
downloadplan9port-89ec3cde42c7b1bb44e6a7b39f73dbec5e892d04.tar.gz
plan9port-89ec3cde42c7b1bb44e6a7b39f73dbec5e892d04.tar.bz2
plan9port-89ec3cde42c7b1bb44e6a7b39f73dbec5e892d04.zip
INSTALL: add -r flag
R=rsc CC=plan9port.codebot http://codereview.appspot.com/4526096
-rw-r--r--CONTRIBUTORS1
-rwxr-xr-xINSTALL6
-rw-r--r--lib/moveplan9.sh4
-rw-r--r--man/man1/install.110
4 files changed, 19 insertions, 2 deletions
diff --git a/CONTRIBUTORS b/CONTRIBUTORS
index 7d4b7594..414fa9b3 100644
--- a/CONTRIBUTORS
+++ b/CONTRIBUTORS
@@ -22,6 +22,7 @@ Mathieu Lonjaret <mathieu.lonjaret@gmail.com>
Michael Teichgräber <mt4swm@googlemail.com>
Michael Teichgräber <mt@ib.wmipf.de>
Nikolai Saoukh <nikolai.saoukh@gmail.com>
+Peter Saveliev <svinota.saveliev@gmail.com>
Richard Miller <millerresearch@gmail.com>
Rob Pike <robpike@gmail.com>
Russ Cox <rsc@swtch.com>
diff --git a/INSTALL b/INSTALL
index 4a175d8d..5f18e28f 100755
--- a/INSTALL
+++ b/INSTALL
@@ -14,8 +14,12 @@ x-c)
dobuild=false
doinstall=true
;;
+x-r)
+ shift
+ PLAN9_TARGET=$1 export PLAN9_TARGET
+ ;;
*)
- echo 'usage: INSTALL [-b | -c]' 1>&2
+ echo 'usage: INSTALL [-b | -c] [-r path]' 1>&2
exit 1
esac
diff --git a/lib/moveplan9.sh b/lib/moveplan9.sh
index b294839f..b2280195 100644
--- a/lib/moveplan9.sh
+++ b/lib/moveplan9.sh
@@ -12,7 +12,9 @@ case $# in
exit 1
esac
-new=`cleanname $PLAN9`
+[ -z "$PLAN9_TARGET" ] && PLAN9_TARGET="$PLAN9"
+new=`cleanname $PLAN9_TARGET`
+
if [ X"$new" = X"" ]
then
echo cleanname failed 1>&2
diff --git a/man/man1/install.1 b/man/man1/install.1
index c7afc54c..43ac8aa0 100644
--- a/man/man1/install.1
+++ b/man/man1/install.1
@@ -8,6 +8,9 @@ cd \*9; ./INSTALL
.B -b
|
.B -c
+] [
+.B -r
+.I path
]
.SH DESCRIPTION
To obtain the Plan 9 tree, use Mercurial
@@ -56,6 +59,13 @@ flag,
performs only the second step.
The first step can be done with the tree in a temporary work directory,
but the second step must be done once the tree is in its final location.
+If you want to build the project in one location and then install into
+another location, use
+.B -r
+.I path
+to specify the
+.I final
+location of Plan9 tree.
These flags are only necessary when trying to conform to the
expectations of certain package management systems.
.PP