[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

SF.net SVN: ledger-smb:[3427] trunk/tools/prepare-company-database.sh



Revision: 3427
          http://ledger-smb.svn.sourceforge.net/ledger-smb/?rev=3427&view=rev
Author:   ehuelsmann
Date:     2011-07-04 19:42:13 +0000 (Mon, 04 Jul 2011)

Log Message:
-----------
Incorporate experiences from setting up 'lutan' with LSMB-1.3 through IRC.

Modified Paths:
--------------
    trunk/tools/prepare-company-database.sh

Modified: trunk/tools/prepare-company-database.sh
===================================================================
--- trunk/tools/prepare-company-database.sh	2011-07-04 13:27:38 UTC (rev 3426)
+++ trunk/tools/prepare-company-database.sh	2011-07-04 19:42:13 UTC (rev 3427)
@@ -175,6 +175,13 @@
   exit 1
 fi
 
+if ! test -f $srcdir/sql/modules/LOADORDER
+then
+  echo "missing file $srcdir/sql/modules/LOADORDER! (use --srcdir argument)"
+  usage
+  exit 1
+fi
+
 psql_args="-h $host -p $port -U $owner"
 psql_cmd="psql $psql_args -d $company_name"
 
@@ -215,7 +222,7 @@
 # -- Basic database structure
 cat $srcdir/sql/Pg-database.sql | $psql_cmd 2>&1 | unchatter
 # -- Additional database structure
-for module in `grep -v -E '^[[:space:]]*#' sql/modules/LOADORDER`
+for module in `grep -v -E '^[[:space:]]*#' $srcdir/sql/modules/LOADORDER`
 do
   cat $srcdir/sql/modules/$module | $psql_cmd 2>&1 | unchatter
 done


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.