direct-io.hg

annotate install.sh @ 15456:eb2b7ce05f97

hvm vlapic: Fix one_shot argument passed to create_periodic_time().
Signed-off-by: Yosuke Iwamatsu <y-iwamatsu@ab.jp.nec.com>
author kfraser@localhost.localdomain
date Tue Jul 03 11:47:08 2007 +0100 (2007-07-03)
parents e639d53330ba
children
rev   line source
kaf24@2828 1 #!/bin/sh
kaf24@2828 2
kaf24@2830 3 src='./install'
kaf24@2830 4 if [ -d ./dist ]; then
kaf24@2830 5 src='./dist/install'
kaf24@2830 6 fi
kaf24@2830 7
kaf24@2830 8 if ! [ -d $src ]; then
kaf24@2830 9 echo "ERROR: Could not find a valid distribution directory."
kaf24@2830 10 echo " If this is a source-only release, try 'make dist'."
kaf24@2828 11 exit 1
kaf24@2828 12 fi
kaf24@2828 13
kaf24@2830 14 dst='/'
kaf24@2828 15 if [ $# -ne 0 ]; then
kaf24@2830 16 dst=$1
kaf24@2828 17 fi
kaf24@2828 18
kaf24@2830 19 if ! [ -d $dst ]; then
kaf24@2828 20 echo "ERROR: You must specify a valid install directory."
kaf24@2830 21 echo " The specified directory '$dst' is not valid."
kaf24@2828 22 exit 1
kaf24@2828 23 fi
kaf24@2828 24
kaf24@9097 25 tmp="`mktemp -d`"
kaf24@9097 26
kaf24@2830 27 echo "Installing Xen from '$src' to '$dst'..."
kaf24@9097 28 (cd $src; tar -cf - * ) | tar -C "$tmp" -xf -
kaf24@2828 29
emellor@7947 30 [ -x "$(which udevinfo)" ] && \
emellor@8040 31 UDEV_VERSION=$(udevinfo -V | sed -e 's/^[^0-9]* \([0-9]\{1,\}\)[^0-9]\{0,\}/\1/')
emellor@7947 32
emellor@7947 33 if [ -n "$UDEV_VERSION" ] && [ $UDEV_VERSION -ge 059 ]; then
kaf24@9097 34 echo " - installing for udev-based system"
kaf24@9097 35 rm -rf "$tmp/etc/hotplug"
kaf24@7255 36 else
kaf24@9097 37 echo " - installing for hotplug-based system"
kaf24@9097 38 rm -rf "$tmp/etc/udev"
kaf24@7255 39 fi
kaf24@7255 40
kaf24@9097 41 echo " - modifying permissions"
kaf24@9097 42 chmod -R a+rX "$tmp"
kaf24@9097 43
kaf24@9097 44 (cd $tmp; tar -cf - *) | tar --no-same-owner -C "$dst" -xf -
kaf24@9097 45 rm -rf "$tmp"
kaf24@9097 46
kaf24@9097 47 echo "All done."
kaf24@9097 48
iap10@2895 49 echo "Checking to see whether prerequisite tools are installed..."
iap10@2895 50 cd $src/../check
iap10@2895 51 ./chk install
iap10@2895 52 echo "All done."
iap10@2895 53
kaf24@2828 54 exit 0