diff options
Diffstat (limited to 'install.sh')
-rwxr-xr-x | install.sh | 23 |
1 files changed, 14 insertions, 9 deletions
diff --git a/install.sh b/install.sh index 2c8f38f06d..6e12009660 100755 --- a/install.sh +++ b/install.sh @@ -1,24 +1,29 @@ #!/bin/sh -if ! [ -d ./install ]; then - echo "ERROR: You must build Xen before it can be installed." - echo " For example, 'make dist'." +src='./install' +if [ -d ./dist ]; then + src='./dist/install' +fi + +if ! [ -d $src ]; then + echo "ERROR: Could not find a valid distribution directory." + echo " If this is a source-only release, try 'make dist'." exit 1 fi -prefix='/' +dst='/' if [ $# -ne 0 ]; then - prefix=$1 + dst=$1 fi -if ! [ -d $prefix ]; then +if ! [ -d $dst ]; then echo "ERROR: You must specify a valid install directory." - echo " The specified directory '$prefix' is not valid." + echo " The specified directory '$dst' is not valid." exit 1 fi -echo "Installing Xen to '$prefix'..." -cp -fdR ./install/* $prefix +echo "Installing Xen from '$src' to '$dst'..." +cp -fdR $src/* $dst echo "All done." exit 0 |