From 1c496fc1ac2c8e40953e3fd9939f9b5fe821efd8 Mon Sep 17 00:00:00 2001
From: tpylak <tpylak>
Date: Tue, 13 Sep 2011 22:56:20 +0000
Subject: [PATCH] minor: fix new db creation scripts

SVN: 22930
---
 openbis/resource/scripts/common.sh                | 3 +--
 openbis/resource/scripts/create_new_db_version.sh | 3 ++-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/openbis/resource/scripts/common.sh b/openbis/resource/scripts/common.sh
index 3c220deefde..015808c6b64 100755
--- a/openbis/resource/scripts/common.sh
+++ b/openbis/resource/scripts/common.sh
@@ -1,8 +1,7 @@
 #!/bin/bash
 # Author: Tomasz Pylak
 # Scripts to create new database version, common to all projects.
-
-SQL_DIR=../../source/sql/
+# Requires setting SQL_DIR variable before being inlined!
 
 PREV_NUM=`ls -1 $SQL_DIR/postgresql | grep 0 | sort | tail -n 1 | sed s/^0*//g`
 PREV_VER=`printf "%03d" $PREV_NUM`
diff --git a/openbis/resource/scripts/create_new_db_version.sh b/openbis/resource/scripts/create_new_db_version.sh
index f53452092d8..ae24f5ff579 100755
--- a/openbis/resource/scripts/create_new_db_version.sh
+++ b/openbis/resource/scripts/create_new_db_version.sh
@@ -3,9 +3,10 @@
 # Creates new database version (all sql files) which is identical to the previous version.
 # Assumes that it is called from the directory where it is located.
 
+SQL_DIR=../../source/sql/
 source common.sh
 
 copy_db_folder generic
 copy_db_folder postgresql
 copy_migration_file
-print_finish_message
\ No newline at end of file
+print_finish_message
-- 
GitLab