ia64/xen-unstable

annotate install.sh @ 16825:5b9b3b41fe89

Make tools/Makefile cross-friendly

Pass Xen cross-compilation options through to ioemu.
Export CROSS_SYS_ROOT for use by scripts. Unexport
IOEMU_DIR since it isn't used outside of the Makefile.

Signed-off-by: Aron Griffis <aron@hp.com>
author Keir Fraser <keir.fraser@citrix.com>
date Tue Jan 22 09:43:53 2008 +0000 (2008-01-22)
parents e639d53330ba
children edfdeb150f27
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@9102 25 tmp="`mktemp -d`"
kaf24@9102 26
kaf24@2830 27 echo "Installing Xen from '$src' to '$dst'..."
kaf24@9102 28 (cd $src; tar -cf - * ) | tar -C "$tmp" -xf -
kaf24@2828 29
emellor@7963 30 [ -x "$(which udevinfo)" ] && \
emellor@8056 31 UDEV_VERSION=$(udevinfo -V | sed -e 's/^[^0-9]* \([0-9]\{1,\}\)[^0-9]\{0,\}/\1/')
emellor@7963 32
emellor@7963 33 if [ -n "$UDEV_VERSION" ] && [ $UDEV_VERSION -ge 059 ]; then
kaf24@9102 34 echo " - installing for udev-based system"
kaf24@9102 35 rm -rf "$tmp/etc/hotplug"
kaf24@7264 36 else
kaf24@9102 37 echo " - installing for hotplug-based system"
kaf24@9102 38 rm -rf "$tmp/etc/udev"
kaf24@7264 39 fi
kaf24@7264 40
kaf24@9102 41 echo " - modifying permissions"
kaf24@9102 42 chmod -R a+rX "$tmp"
kaf24@9102 43
kaf24@9102 44 (cd $tmp; tar -cf - *) | tar --no-same-owner -C "$dst" -xf -
kaf24@9102 45 rm -rf "$tmp"
kaf24@9102 46
kaf24@9102 47 echo "All done."
kaf24@9102 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