aboutsummaryrefslogtreecommitdiffstats
path: root/install.sh
diff options
context:
space:
mode:
authorkaf24@freefall.cl.cam.ac.uk <kaf24@freefall.cl.cam.ac.uk>2004-11-02 17:57:41 +0000
committerkaf24@freefall.cl.cam.ac.uk <kaf24@freefall.cl.cam.ac.uk>2004-11-02 17:57:41 +0000
commite81e528835b229f805c0cfdae0731147471ae554 (patch)
tree0b5c3c3e6c150e49fd4f59ee90fa4700e92acbe3 /install.sh
parentca9b4638d2e1f962f64474442f3b3198d5239a43 (diff)
downloadxen-e81e528835b229f805c0cfdae0731147471ae554.tar.gz
xen-e81e528835b229f805c0cfdae0731147471ae554.tar.bz2
xen-e81e528835b229f805c0cfdae0731147471ae554.zip
bitkeeper revision 1.1159.1.338 (4187ca95yoh3y8SwBJw4uTmgIxLCTw)
A new install script to install from the intermediate 'install' subdir. Also now a bit more careful in use of 'cp -a'. When installing to system-wide directories we probably do not want to preserve ownership of the random unprivileged user that originally built the binaries. The user who does the install (probably root) is the correct person to own the target files.
Diffstat (limited to 'install.sh')
-rwxr-xr-xinstall.sh24
1 files changed, 24 insertions, 0 deletions
diff --git a/install.sh b/install.sh
new file mode 100755
index 0000000000..2c8f38f06d
--- /dev/null
+++ b/install.sh
@@ -0,0 +1,24 @@
+#!/bin/sh
+
+if ! [ -d ./install ]; then
+ echo "ERROR: You must build Xen before it can be installed."
+ echo " For example, 'make dist'."
+ exit 1
+fi
+
+prefix='/'
+if [ $# -ne 0 ]; then
+ prefix=$1
+fi
+
+if ! [ -d $prefix ]; then
+ echo "ERROR: You must specify a valid install directory."
+ echo " The specified directory '$prefix' is not valid."
+ exit 1
+fi
+
+echo "Installing Xen to '$prefix'..."
+cp -fdR ./install/* $prefix
+echo "All done."
+
+exit 0