From 40198e820dd2ffa8575e0131490f18b2e6cb5cdd Mon Sep 17 00:00:00 2001
From: erickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Date: Mon, 25 Jan 2010 17:48:40 +0000
Subject: [PATCH] Patch from Joe Atzberger to allow db update script to run
 from the ILS base directory

git-svn-id: svn://svn.open-ils.org/ILS/trunk@15380 dcc99617-32d9-48b4-a31d-7c20da2025e4
---
 build/tools/update_db.sh | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/build/tools/update_db.sh b/build/tools/update_db.sh
index d0c1f37441..5e3ab12e19 100644
--- a/build/tools/update_db.sh
+++ b/build/tools/update_db.sh
@@ -25,7 +25,7 @@ PARAMETERS:
   db_user - database username
   db_name - database name
     
-Run from your source repository Open-ILS/src/sql/Pg directory.
+Run from your source repository root or Open-ILS/src/sql/Pg directory.
 
 You will be prompted for the postgres password if necessary.
 
@@ -62,6 +62,9 @@ VERSION=$(echo $VERSION | sed -e 's/^ *0*//');    # This is a separate step so w
 [ -z "$VERSION" ] && usage_die "config.upgrade_log missing ANY installed version data!";
 echo "* Last installed version -> $VERSION";
 
+if [ -d ./Open-ILS/src/sql/Pg ] ; then
+    cd ./Open-ILS/src/sql/Pg ;
+fi
 [ -d ./upgrade ] || usage_die "No ./upgrade directory found.  Please run from Open-ILS/src/sql/Pg";
 
 declare -a FILES;
-- 
2.11.0