[Mapbender-commits] r3759 - branches/2.5/resources/db
svn_mapbender at osgeo.org
svn_mapbender at osgeo.org
Tue Mar 17 06:19:39 EDT 2009
Author: christoph
Date: 2009-03-17 06:19:38 -0400 (Tue, 17 Mar 2009)
New Revision: 3759
Added:
branches/2.5/resources/db/install_2.5.1.sh
Removed:
branches/2.5/resources/db/install.sh
Log:
renamed
added latest update SQLs
Deleted: branches/2.5/resources/db/install.sh
===================================================================
--- branches/2.5/resources/db/install.sh 2009-03-17 10:18:26 UTC (rev 3758)
+++ branches/2.5/resources/db/install.sh 2009-03-17 10:19:38 UTC (rev 3759)
@@ -1,103 +0,0 @@
-#!/bin/bash
-#
-
-rm log_*.txt
-
-# Disclaimer
-echo ""
-echo "DISCLAIMER: this Mapbender database setup script is not stable. USE AT YOUR OWN RISK!"
-echo ""
-echo "Continue? (y)es or (n)o"
-read disclaimer
-
-if test $disclaimer != "y"
-then
- exit 1
-fi
-
-# ask for db version
-echo ""
-echo "Database version? (p)ostgresql or (m)ysql?"
-read dbversion
-
-if test $dbversion != "p" -a $dbversion != "m"
-then
- echo ""
- echo "Incorrect database type. Terminating the script..."
- exit 1
-fi
-
-# ask for db character encoding
-echo ""
-echo "Database character encoding? (i)so-8859-1 or (u)tf-8?"
-read dbenc
-
-if test $dbenc != "i" -a $dbenc != "u"
-then
- echo ""
- echo "Incorrect database character encoding. Terminating the script..."
- exit 1
-fi
-
-# ask for database name
-echo ""
-echo "Name of database?"
-read dbname
-
-
-if test $dbversion = "m"
-then
- echo ""
- echo "Enter your MySQL password:"
- stty -echo
- read password
- stty echo
- echo ""
-
- if test $dbenc = "i"
- then
- echo ""
- echo "Installing Mapbender with MySQL (ISO-8859-1) in database $dbname";
- echo ""
-
- mysql -e "create database $dbname CHARACTER SET latin1 COLLATE latin1_german1_ci;" -p$password
- mysql $dbname -p$password < mysql/mysql_schema_2.5.sql > log_schema.txt
- mysql $dbname -p$password < mysql/iso/mysql_data_2.5.sql > log_data.txt
- mysql $dbname -p$password < mysql/iso/update/update_2.5_to_2.5.1rc1_mysql_ISO-8859-1.sql > log_update.txt
-
- elif test $dbenc = "u"
- then
- echo ""
- echo "Installing Mapbender with MySQL (UTF-8) in database $dbname";
- echo ""
-
- mysql -e "create database $dbname CHARACTER SET utf8 COLLATE utf8_general_ci;" -p$password
- mysql $dbname -p$password < mysql/mysql_schema_2.5.sql > log_schema.txt
- mysql $dbname -p$password < mysql/utf8/mysql_data_2.5.sql > log_data.txt
- mysql $dbname -p$password < mysql/utf8/update/update_2.5_to_2.5.1rc1_mysql_UTF-8.sql > log_update.txt
- fi
-elif test $dbversion = "p" -a $dbenc = "i"
-then
- echo ""
- echo "Installing Mapbender with PostgreSQL (ISO-8859-1) in database $dbname";
- echo ""
- createdb -E ISO-8859-1 $dbname
- psql -f postgresql/pgsql_schema_2.5.sql $dbname > log_schema.txt
- psql -f postgresql/iso/pgsql_data_2.5.sql $dbname > log_data.txt
- psql -f postgresql/pgsql_serial_set_sequences_2.5.sql $dbname > log_sequences.txt
- psql -f postgresql/iso/update/update_2.5_to_2.5.1rc1_pgsql_ISO-8859-1.sql $dbname > log_update.txt
-
-elif test $dbversion = "p" -a $dbenc = "u"
-then
- echo ""
- echo "Installing Mapbender with PostgreSQL (UTF-8) in database $dbname";
- echo ""
- createdb -E UTF-8 $dbname
- psql -f postgresql/pgsql_schema_2.5.sql $dbname > log_schema.txt
- psql -f postgresql/utf8/pgsql_data_2.5.sql $dbname > log_data.txt
- psql -f postgresql/pgsql_serial_set_sequences_2.5.sql $dbname > log_sequences.txt
- psql -f postgresql/utf8/update/update_2.5_to_2.5.1rc1_pgsql_UTF-8.sql $dbname > log_update.txt
-fi
-
-echo ""
-echo "Finished...check the log files to see if an error occured.";
\ No newline at end of file
Added: branches/2.5/resources/db/install_2.5.1.sh
===================================================================
--- branches/2.5/resources/db/install_2.5.1.sh (rev 0)
+++ branches/2.5/resources/db/install_2.5.1.sh 2009-03-17 10:19:38 UTC (rev 3759)
@@ -0,0 +1,112 @@
+#!/bin/bash
+#
+
+rm log_*.txt
+
+# Disclaimer
+echo ""
+echo "DISCLAIMER: this Mapbender database setup script is not stable. USE AT YOUR OWN RISK!"
+echo ""
+echo "Continue? (y)es or (n)o"
+read disclaimer
+
+if test $disclaimer != "y"
+then
+ exit 1
+fi
+
+# ask for db version
+echo ""
+echo "Database version? (p)ostgresql or (m)ysql?"
+read dbversion
+
+if test $dbversion != "p" -a $dbversion != "m"
+then
+ echo ""
+ echo "Incorrect database type. Terminating the script..."
+ exit 1
+fi
+
+# ask for db character encoding
+echo ""
+echo "Database character encoding? (i)so-8859-1 or (u)tf-8?"
+read dbenc
+
+if test $dbenc != "i" -a $dbenc != "u"
+then
+ echo ""
+ echo "Incorrect database character encoding. Terminating the script..."
+ exit 1
+fi
+
+# ask for database name
+echo ""
+echo "Name of database?"
+read dbname
+
+
+if test $dbversion = "m"
+then
+ echo ""
+ echo "Enter your MySQL password:"
+ stty -echo
+ read password
+ stty echo
+ echo ""
+
+ if test $dbenc = "i"
+ then
+ echo ""
+ echo "Installing Mapbender with MySQL (ISO-8859-1) in database $dbname";
+ echo ""
+
+ mysql -e "create database $dbname CHARACTER SET latin1 COLLATE latin1_german1_ci;" -p$password
+ mysql $dbname -p$password < mysql/mysql_schema_2.5.sql > log_schema.txt
+ mysql $dbname -p$password < mysql/iso/mysql_data_2.5.sql > log_data.txt
+ mysql $dbname -p$password < mysql/iso/update/update_2.5_to_2.5.1rc1_mysql_ISO-8859-1.sql > log_update.txt
+ mysql $dbname -p$password < mysql/iso/update/update_2.5.1rc1_to_2.5.1_mysql_ISO-8859-1.sql > log_update.txt
+
+ elif test $dbenc = "u"
+ then
+ echo ""
+ echo "Installing Mapbender with MySQL (UTF-8) in database $dbname";
+ echo ""
+
+ mysql -e "create database $dbname CHARACTER SET utf8 COLLATE utf8_general_ci;" -p$password
+ mysql $dbname -p$password < mysql/mysql_schema_2.5.sql > log_schema.txt
+ mysql $dbname -p$password < mysql/utf8/mysql_data_2.5.sql > log_data.txt
+ mysql $dbname -p$password < mysql/utf8/update/update_2.5_to_2.5.1rc1_mysql_UTF-8.sql > log_update.txt
+ mysql $dbname -p$password < mysql/utf8/update/update_2.5.1rc1_to_2.5.1_mysql_UTF-8.sql > log_update.txt
+ fi
+elif test $dbversion = "p" -a $dbenc = "i"
+then
+ echo ""
+ echo "Installing Mapbender with PostgreSQL (ISO-8859-1) in database $dbname";
+ echo ""
+ createdb -E ISO-8859-1 $dbname
+ psql -f postgresql/pgsql_schema_2.5.sql $dbname > log_schema.txt
+ psql -f postgresql/iso/pgsql_data_2.5.sql $dbname > log_data.txt
+ psql -f postgresql/pgsql_serial_set_sequences_2.5.sql $dbname > log_sequences.txt
+ psql -f postgresql/iso/update/update_2.5_to_2.5.1rc1_pgsql_ISO-8859-1.sql $dbname > log_update.txt
+ psql -f postgresql/iso/update/update_2.5.1rc1_to_2.5.1_pgsql_ISO-8859-1.sql $dbname > log_update.txt
+
+elif test $dbversion = "p" -a $dbenc = "u"
+then
+ echo ""
+ echo "Installing Mapbender with PostgreSQL (UTF-8) in database $dbname";
+ echo ""
+ createdb -E UTF-8 $dbname
+ psql -f postgresql/pgsql_schema_2.5.sql $dbname > log_schema.txt
+ psql -f postgresql/utf8/pgsql_data_2.5.sql $dbname > log_data.txt
+ psql -f postgresql/pgsql_serial_set_sequences_2.5.sql $dbname > log_sequences.txt
+ psql -f postgresql/utf8/update/update_2.5_to_2.5.1rc1_pgsql_UTF-8.sql $dbname > log_update.txt
+ psql -f postgresql/utf8/update/update_2.5.1rc1_to_2.5.1_pgsql_UTF-8.sql $dbname > log_update.txt
+fi
+
+echo ""
+echo "Compiling .po files..."
+cd ../../tools/
+./i18n_update_mo.sh
+echo ""
+echo ""
+echo "Finished...check the log files to see if an error occured.";
\ No newline at end of file
More information about the Mapbender_commits
mailing list