From e4e112cfc15070baf4e2e23f5a1bccfda485685b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Javier=20Font=C3=A1n=20Mui=C3=B1os?= Date: Thu, 24 Jul 2008 11:33:54 +0000 Subject: [PATCH] Changed install script to copy files by default. Now there is also a "-l" flag to create links (for easy upgrading from svn repository) git-svn-id: http://svn.opennebula.org/trunk@78 3034c82b-c49b-4eb3-8279-a7acafdc01c0 --- install.sh | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/install.sh b/install.sh index 99429deead..730733d6ff 100755 --- a/install.sh +++ b/install.sh @@ -1,5 +1,12 @@ #!/bin/sh +MAKE_LINKS="no" + +if [ "$1" == "-l" ]; then + MAKE_LINKS="yes" + shift +fi + SRC_DIR=$PWD DST_DIR=$1 @@ -7,7 +14,11 @@ echo $SRC_DIR echo $DST_DIR inst_ln() { - ln -s $SRC_DIR/$1 $DST_DIR/$2 + if [ "$MAKE_LINKS" == "yes" ]; then + ln -s $SRC_DIR/$1 $DST_DIR/$2 + else + cp $SRC_DIR/$1 $DST_DIR/$2 + fi } inst_cp() {