[Mapbender-commits] r5166 - trunk/mapbender/resources/db

svn_mapbender at osgeo.org svn_mapbender at osgeo.org
Sat Dec 12 07:46:05 EST 2009


Author: astrid_emde
Date: 2009-12-12 07:46:05 -0500 (Sat, 12 Dec 2009)
New Revision: 5166

Modified:
   trunk/mapbender/resources/db/update.sh
Log:


Modified: trunk/mapbender/resources/db/update.sh
===================================================================
--- trunk/mapbender/resources/db/update.sh	2009-12-12 12:39:17 UTC (rev 5165)
+++ trunk/mapbender/resources/db/update.sh	2009-12-12 12:46:05 UTC (rev 5166)
@@ -38,15 +38,6 @@
         read DBVERSION
     done
 
-    # db encoding
-    until [ "$DBENCODING" = "i" -o "$DBENCODING" = "u" ]
-    do
-        echo ""
-        echo "database character encoding? (i)so-8859-1 or (u)tf-8?"
-        read DBENCODING
-    done
-
-
     # db name
     until [ -n "$DBNAME" ]
     do
@@ -86,7 +77,26 @@
 
 }
 
-function create_mysql_db(){
+#show Database Configuration
+function show_db_config(){
+    echo ""
+    echo "Database Configuration:"
+    echo "version:"  $DBVERSION
+    echo "encoding:" $DBENCODING
+    if [ $DBTEMPLATE ]
+    then
+        echo "postgres template:" $DBTEMPLATE
+    fi
+    echo "db host:" $DBHOST
+    echo "db port:" $DBPORT
+    echo "dbname:" $DBNAME
+    echo "user:"     $DBUSER
+    echo ""
+
+}
+
+
+function run_mysql_update(){
     which mysql > /dev/null
     if [ $? -ne 0 ]
     then
@@ -105,7 +115,7 @@
 }
 
 #Create Database (Postgres)
-function create_pgsql_db(){
+function run_pgsql_update(){
     which psql createdb > /dev/null
     if [ $? -ne 0 ]
     then
@@ -131,10 +141,10 @@
 if [ $DBVERSION = "pgsql" ]
 then
     echo "Updating Postgres Database"
-    create_pgsql_db;
+    run_pgsql_update;
 else
     echo "Upting Mysql Database"
-    create_mysql_db;
+    run_mysql_update;
     echo ""
 fi
 



More information about the Mapbender_commits mailing list