Chris Hillery has proposed merging lp:~zorba-coders/zorba/install_mysql_update 
into lp:zorba/jdbc-module.

Requested reviews:
  Cezar Andrei (cezar-andrei)
  Chris Hillery (ceejatec)

For more details, see:
https://code.launchpad.net/~zorba-coders/zorba/install_mysql_update/+merge/171032
-- 
https://code.launchpad.net/~zorba-coders/zorba/install_mysql_update/+merge/171032
Your team Zorba Coders is subscribed to branch lp:zorba/jdbc-module.
=== modified file 'setup/mysql-setup.sh'
--- setup/mysql-setup.sh	2013-01-03 10:58:09 +0000
+++ setup/mysql-setup.sh	2013-06-24 08:18:29 +0000
@@ -1,7 +1,7 @@
 #!/bin/bash
 
 # Default location to dump stuff and create databases
-WORKDIR=~/jdbc-module-mysql
+WORKDIR=`pwd`/jdbc-module-mysql
 
 # MySQL'd "datadir"
 DATADIR=${WORKDIR}/datadir
@@ -9,6 +9,10 @@
 # Location for the logs
 LOGDIR=${WORKDIR}/log
 
+# Filename for download
+MYSQL_PKG=mysql-5.6.12-linux-glibc2.5-x86_64
+MYSQL_TGZ=${MYSQL_PKG}.tar.gz
+
 while getopts distchw: opt
 do
   case "$opt" in
@@ -19,17 +23,17 @@
         d)
             echo "Download"
             mkdir -p $WORKDIR
+            (
             cd $WORKDIR
-            wget http://cdn.mysql.com/Downloads/MySQL-5.5/mysql-5.5.28-linux2.6-x86_64.tar.gz
-            wget http://cdn.mysql.com/Downloads/Connector-J/mysql-connector-java-5.1.22.tar.gz
+            wget -c http://cdn.mysql.com/Downloads/MySQL-5.6/$MYSQL_TGZ
+            )
             ;;
         i)
             echo "Install"
             (
             cd $WORKDIR
-            tar -xvzf mysql-5.5.28-linux2.6-x86_64.tar.gz
-            tar -xvzf mysql-connector-java-5.1.22.tar.gz
-            mv mysql-5.5.28-linux2.6-x86_64 mysql
+            tar -xvzf $MYSQL_TGZ
+            mv $MYSQL_PKG mysql
             sudo apt-get install libaio1
             mkdir -p $DATADIR $LOGDIR $DATADIR/innodb_log
             ./mysql/scripts/mysql_install_db --user=$USER --datadir=$DATADIR --basedir=./mysql --no-defaults
@@ -39,9 +43,10 @@
             ;;
         s)
             echo "Start"
+            (
             cd $WORKDIR/mysql
             ./bin/mysqld_safe --defaults-file=$DATADIR/my.cnf --user=$USER --pid-file=$DATADIR/mysql_rq.pid --datadir=$DATADIR --log-error=$LOGDIR/log.err &
-            cd ..
+            )
             ;;
         t)
             echo "Stop"
@@ -49,9 +54,10 @@
             ;;
         c)
             echo "Clean everything"
+            (
             cd $WORKDIR
             rm -fR ./mysql
-            rm -fR ./mysql-connector-java-5.1.22
+            )
             ;;            
         h)
             echo "usage: $0 [-distcvh] [-w path]"

-- 
Mailing list: https://launchpad.net/~zorba-coders
Post to     : zorba-coders@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zorba-coders
More help   : https://help.launchpad.net/ListHelp

Reply via email to