added possibility to run postbuild-scripts
authorrk <rk>
Thu, 24 Jan 2002 00:39:34 +0000 (00:39 +0000)
committerrk <rk>
Thu, 24 Jan 2002 00:39:34 +0000 (00:39 +0000)
build.sh-dist
source/mir/storage/DatabaseAdaptorPostgresql.java
source/mir/storage/DatabaseConfig.java

index 8afa4c7..93bc2ac 100755 (executable)
@@ -34,3 +34,13 @@ ANT_HOME=LIB_HOME             # use mir-ant
 # Execute ANT to perform the requested build target
 $JAVA_HOME/bin/java -classpath $CP:$CLASSPATH org.apache.tools.ant.Main \
   -Dtomcat.home=$TOMCAT_HOME "$@"
+
+
+#
+# execute postbuild script if present
+
+if [ -f ./build.post ]; then
+          echo "Executing build.post"
+         sh build.post
+fi
+
index 39b2a57..f00c5de 100755 (executable)
@@ -12,7 +12,10 @@ import mir.misc.*;
 
 public final class DatabaseAdaptorPostgresql implements DatabaseAdaptor{
 
-    private static String url = "jdbc:postgresql://localhost:5432/mir";
+//    private static String url = "jdbc:postgresql://localhost:5432/mir";
+// just testing
+
+    private static String url = "jdbc:postgresql://localhost:5432/mir_unstable";
     private static String driver = "org.postgresql.Driver";
 
     public String getDriver() {
index 46f043f..a9e7c3e 100755 (executable)
@@ -31,6 +31,10 @@ public class DatabaseConfig {
     configHash.put("Database.poolMax", "10");
     configHash.put("Database.poolLog", "/tmp/pool.log");
     configHash.put("Database.poolResetTime", "1.0");
+
+    // just for testing
+    configHash.put("Database.Username", "postgres");
+    configHash.put("Database.Password", "");
   }
 
   public static void setUsername(String user) {
@@ -52,7 +56,7 @@ public class DatabaseConfig {
   public static void setDefaultLimit(int limit) {
     configHash.put("Database.Limit", Integer.toString(limit));
   }
-  
+
   public static void setPoolMin(int min) {
     configHash.put("Database.poolMin", Integer.toString(min));
   }