From aab4e135483ee293f4cb8dbccc7470aa743ed2f0 Mon Sep 17 00:00:00 2001 From: Sinisa Veseli <sveseli@aps.anl.gov> Date: Mon, 13 Apr 2015 13:34:36 +0000 Subject: [PATCH] add postgres utilities into path; add support for DM_INSTALL_DIR --- setup.sh | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/setup.sh b/setup.sh index fb5488c0..9796b902 100644 --- a/setup.sh +++ b/setup.sh @@ -11,6 +11,14 @@ fi export DM_ROOT_DIR=`pwd` export DM_HOST_ARCH=`uname | tr [A-Z] [a-z]`-`uname -m` +if [ -z $DM_INSTALL_DIR ]; then + export DM_INSTALL_DIR=$DM_ROOT_DIR/.. + if [ -d $DM_INSTALL_DIR ]; then + cd $DM_INSTALL_DIR + export DM_INSTALL_DIR=`pwd` + fi +fi + if [ -z $DM_DATA_DIR ]; then export DM_DATA_DIR=$DM_ROOT_DIR/../data if [ -d $DM_DATA_DIR ]; then @@ -93,6 +101,20 @@ else fi export PYTHONPATH +# Setup postgres. +if [ -z $DM_POSTGRESQL_DIR ]; then + postgresqlDir=$DM_SUPPORT_DIR/postgresql/$DM_HOST_ARCH +else + postgresqlDir=$DM_POSTGRESQL_DIR +fi +if [ -d $postgresqlDir ]; then + cd $postgresqlDir + postgresqlDir=`pwd` + export PATH=`pwd`/bin:$PATH + export LD_LIBRARY_PATH=`pwd`/lib:$LD_LIBRARY_PATH + export DM_POSTGRESQL_DIR=$postgresqlDir +fi + # Get back to where we were before invoking the setup script cd $currentDir -- GitLab