[LON-CAPA-cvs] cvs: loncom /debugging_tools db_copy.pl

albertel lon-capa-cvs@mail.lon-capa.org
Tue, 03 Oct 2006 18:01:05 -0000


albertel		Tue Oct  3 14:01:05 2006 EDT

  Modified files:              
    /loncom/debugging_tools	db_copy.pl 
  Log:
  - add in default refs to correct programs
  - addin some helpful error messages
  
  
Index: loncom/debugging_tools/db_copy.pl
diff -u loncom/debugging_tools/db_copy.pl:1.2 loncom/debugging_tools/db_copy.pl:1.3
--- loncom/debugging_tools/db_copy.pl:1.2	Wed Sep 20 15:23:24 2006
+++ loncom/debugging_tools/db_copy.pl	Tue Oct  3 14:01:01 2006
@@ -10,9 +10,12 @@
 use LONCAPA::Configuration;
 use Cwd;
 
-my $dump_db = './dump_db';
-my $create_db = './create_db';
-my $dir = './annarbor';
+my $dump_db = '/home/httpd/perl/debug/dump_db_static_32';
+my $create_db = '/home/httpd/perl/debug/create_db_dynamic';
+if (!-x $dump_db || !-x $create_db) {
+    print("Unable to run needed helper programs\n $dump_db\n $create_db\n.");
+    exit(-1);
+}
 
 my  %perlvar=%{&LONCAPA::Configuration::read_conf('loncapa.conf')};
 
@@ -65,8 +68,7 @@
 	     no_chdir   => 1,
 	     wanted     => \&process_db,
 	 }, 
-	 $dir
-	 #$perlvar->{'lonUsersDir'}
+	 $perlvar{'lonUsersDir'}
 	 );
 }