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

SF.net SVN: ledger-smb:[3781] branches/1.3/sql/modules/reload_modules.sh



Revision: 3781
          http://ledger-smb.svn.sourceforge.net/ledger-smb/?rev=3781&view=rev
Author:   einhverfr
Date:     2011-09-30 18:51:18 +0000 (Fri, 30 Sep 2011)
Log Message:
-----------
Adding module reload script

Added Paths:
-----------
    branches/1.3/sql/modules/reload_modules.sh

Added: branches/1.3/sql/modules/reload_modules.sh
===================================================================
--- branches/1.3/sql/modules/reload_modules.sh	                        (rev 0)
+++ branches/1.3/sql/modules/reload_modules.sh	2011-09-30 18:51:18 UTC (rev 3781)
@@ -0,0 +1,16 @@
+#!/bin/bash
+
+if test -z "$1"
+then
+  echo "Usage: $0 COMPANY"
+  echo "\"COMPANY\" is the name of the company database, such as the name given"
+  echo "to --company when using the prepare-company-database.sh script."
+  exit 1
+fi
+
+
+for a in `sed -e 's/^\s*//' -e 's/\s*$//' -e 's/#.*$//' LOADORDER | grep -v '^$'`
+do
+      psql -f "$a" -U postgres $1
+done
+

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