Changes required to implement config files that can be overridden locally.
[eq/.git] / bin / merge_eq_ppi_eq_interview_tables
index c53ed4fc58b09535cc1fd843133d74ecbe79c2c3..cd7484b84680f473bff49b5aadd50217c1eb48e4 100755 (executable)
@@ -3,14 +3,10 @@
 use DBI;
 use Getopt::Std;
 
-###################################################
-# GLOBALS
-$dbname = "phpgroupware";
-$dbhost = "192.168.0.2"; # This can be an IP address or name
-$dbport = 3306;
-$dbuser = "phpgroupware"; # This may require an additional '\@localhost'
-$dbpass = "phpgroupware"; 
-###################################################
+$mydir = `cd \$(dirname $0) 2>/dev/null; pwd`; chomp($mydir);
+unshift @INC,("$mydir/../setup");
+if( -f "$mydir/../setup/db_config.local") { require "db_config.local"; }
+else { require "db_config"; }
 
 ###################################################
 # Connect to the database