Permalink
Browse files

Fix mysqlclient10 error, /script/version detection and 7za missing bi…

…nary
  • Loading branch information...
1 parent 0b179f3 commit c7ca1b60fadfc33e2614b19728d381afb7727065 Ángel Guzmán Maeso committed Mar 2, 2012
@@ -66,24 +66,33 @@ else
echo 'Development GIT version found. Skipping download sources.'
fi
#
- echo Unpacking installation package
- unzip -oq hypervm-install.zip
+
+ if [ ! -d '../../.git' ]; then
+ echo "Unpacking installation package"
+ unzip -oq hypervm-install.zip
+ else
+ echo "Unpacking installation package from current development version"
+ unzip -oq ../hypervm-install.zip
+ fi
cd hypervm-install/hypervm-linux
echo Starting main installation script
- php lxins.php --install-type=master $* | tee hypervm_install.log
+ php lxins.php --install-type=master $1 $2 | tee hypervm_install.log
}
#
# Check how we were called.
#
case "$1" in
--virtualization-type=xen)
- start
+ echo 'Installing HyperVM with Xen virtualization'
+ start $*
;;
--virtualization-type=openvz)
- start
+ echo 'Installing HyperVM with OpenVZ virtualization'
+ start $*
;;
--virtualization-type=NONE)
- start
+ echo 'Installing HyperVM with default(Xen) virtualization'
+ start $*
;;
*)
echo $"This is the HyperVM Install script"
@@ -113,7 +113,7 @@ function lxins_main()
$list = array("which", "lxlighttpd", "zip","unzip", "lxphp", "lxzend", "curl");
if ($installtype !== 'slave') {
- $mysql = array("mysql", "mysql-server", "mysqlclient10");
+ $mysql = array("mysql", "mysql-server", "mysqlclient*");
$list = array_merge($list, $mysql);
}
@@ -30,18 +30,24 @@
######
echo "################################"
echo "### Start packaging"
-echo "### read version..."
-# Read version
-# Please note, this must be a running (HyperVM installed) machine (Development/Test/Release server)
-if ! [ -f /script/version ] ; then
- echo "## Packaging failed. No /script/version found."
- echo "## Are you sure you are running a development version?"
- echo "### Aborted."
- echo "################################"
- exit
+
+if [ ! -d '../.git' ]; then
+ echo "### read version..."
+ # Read version
+ # Please note, this must be a running (HyperVM installed) machine (Development/Test/Release server)
+ if ! [ -f /script/version ] ; then
+ echo "## Packaging failed. No /script/version found."
+ echo "## Are you sure you are running a development version?"
+ echo "### Aborted."
+ echo "################################"
+ exit
+ fi
+ version=`/script/version`
+ build=`git log --pretty=format:'' | wc -l`
+else
+ version='current'
+ build=''
fi
-version=`/script/version`
-build=`git log --pretty=format:'' | wc -l`
rm -f hypervm-$version.$build.zip
#
@@ -71,12 +77,16 @@ tar cvfz $file \
file=hypervm-$version.$build.7z
+if [ -f /usr/bin/7za ] ; then
+# This requires RPMforge enabled (Centos 5.7 still not provide 7za binary)
+# yum install p7zip
7za a \
-xr!?svn\* \
-xr!?git\* \
-xr!CVS\* \
$file \
./src ./bin ./cexe ./file ./httpdocs ./pscript ./sbin ./RELEASEINFO
+fi
echo "### Finished"
echo "################################"

0 comments on commit c7ca1b6

Please sign in to comment.