[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
SF.net SVN: ledger-smb:[2740] trunk
- Subject: SF.net SVN: ledger-smb:[2740] trunk
- From: ..hidden..
- Date: Sun, 26 Jul 2009 18:00:44 +0000
Revision: 2740
http://ledger-smb.svn.sourceforge.net/ledger-smb/?rev=2740&view=rev
Author: einhverfr
Date: 2009-07-26 18:00:44 +0000 (Sun, 26 Jul 2009)
Log Message:
-----------
installation fixes
Modified Paths:
--------------
trunk/LedgerSMB/Initiate.pm
trunk/sql/modules/README
Added Paths:
-----------
trunk/sql/modules/LOADORDER
Modified: trunk/LedgerSMB/Initiate.pm
===================================================================
--- trunk/LedgerSMB/Initiate.pm 2009-07-26 01:35:05 UTC (rev 2739)
+++ trunk/LedgerSMB/Initiate.pm 2009-07-26 18:00:44 UTC (rev 2740)
@@ -485,29 +485,29 @@
my $dir=$ENV{SCRIPT_FILENAME};
- my $location="/sql/modules/";
+ my $dir = "sql/modules/";
- $dir =~s/\/[\w\d\.]*$/$location/;
- my @dir=LedgerSMB::Initiate->read_directory($form,$dir);
-
#now dilemma with search files($dest)
#1.List from README file
- #2.Read all sql files from sql/modules/
-
- #Now implementing 2 one .Chris can you suggest me whether to go with 1 or 2
-
- my @dest = grep /\.sql$/,@dir;
+ #2.Read all sql files from sql/modules/ -- Sadashiva
+ #
+ # I moved the info out of README into LOADORDER to be more friendly to
+ # programmers. --Chris
+ open(ORD, '<', $dir . "LOADORDER");
+ while (my $line = <ORD>){
+ $line =~ s/\#.*$//; # ignore comments
+ next if $line ~= /^\s*$/;
+ $line =~ s/^\s*//;
+ $line =~ s/\s*$//;
+ push @dest, $dir.$line;
+ }
- for(my $i=0;$i<=$#dest;$i++)
- {
-
- $dest[$i]=$dir.$dest[$i];
- }
+
return(@dest);
Added: trunk/sql/modules/LOADORDER
===================================================================
--- trunk/sql/modules/LOADORDER (rev 0)
+++ trunk/sql/modules/LOADORDER 2009-07-26 18:00:44 UTC (rev 2740)
@@ -0,0 +1,21 @@
+# This is a simple list of files to be loaded from sql/modules in the order
+# they shall be loaded.
+Drafts.sql
+chart.sql
+Account.sql
+Session.sql
+Business_type.sql
+Location.sql
+Company.sql
+Customer.sql
+Date.sql
+Defaults.sql
+Settings.sql
+Employee.sql
+Entity.sql
+Payment.sql
+Person.sql
+Report.sql
+Voucher.sql
+admin.sql
+Reconciliaton.sql
Modified: trunk/sql/modules/README
===================================================================
--- trunk/sql/modules/README 2009-07-26 01:35:05 UTC (rev 2739)
+++ trunk/sql/modules/README 2009-07-26 18:00:44 UTC (rev 2740)
@@ -6,25 +6,7 @@
should work. Note that many of these scripts declare types, so if you want to
redefine functions, you will need to drop the types and reload the scripts.
-Drafts.sql
-chart.sql
-Account.sql
-Session.sql
-Business_type.sql
-Location.sql
-Company.sql
-Customer.sql
-Date.sql
-Defaults.sql
-Settings.sql
-Employee.sql
-Entity.sql
-Payment.sql
-Person.sql
-Report.sql
-Voucher.sql
-admin.sql
-Reconciliaton.sql
+The load order for the files is documented in sql/modules/LOADORDER
Note that the Roles.sql is special and must be preprocessed to get it to work.
A command like:
@@ -35,6 +17,3 @@
Also Roles.sql MUST be run last because portions of it depend on function
declarations in the other scripts.
-The following files are not ready to be loaded:
-
-security.sql
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.