ia64/xen-unstable

annotate install.sh @ 3565:30ee9c427a5b

bitkeeper revision 1.1159.212.46 (41f952dcjUM7tDOqBgJxR2_d9qUROA)

Merge
author mwilli2@equilibrium.research
date Thu Jan 27 20:45:16 2005 +0000 (2005-01-27)
parents 074d7606fd61 9f592e7728db
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@2830 25 echo "Installing Xen from '$src' to '$dst'..."
iap10@3518 26 cd $src/boot
iap10@3547 27 (echo '2.6.*' -2.6; echo '2.4.*' -2.4; echo '2.*.*' '') | while read m v
iap10@3518 28 do
iap10@3518 29 l=$(eval ls -t vmlinuz-$m-xen0 2>/dev/null | head -n 1)
iap10@3518 30 [ -e "$l" ] && ln -fs "$l" vmlinuz${v}-xen0
iap10@3518 31 l=$(eval ls -t vmlinuz-$m-xenU 2>/dev/null | head -n 1)
iap10@3518 32 [ -e "$l" ] && ln -fs "$l" vmlinuz${v}-xenU
iap10@3518 33 done
iap10@3518 34 cd -
kaf24@2830 35 cp -fdR $src/* $dst
kaf24@2828 36 echo "All done."
kaf24@2828 37
iap10@2895 38 echo "Checking to see whether prerequisite tools are installed..."
iap10@2895 39 cd $src/../check
iap10@2895 40 ./chk install
iap10@2895 41 echo "All done."
iap10@2895 42
kaf24@2828 43 exit 0