From 57cc934d766c7a079284d163b198f517a033d278 Mon Sep 17 00:00:00 2001 From: Mike Duff Date: Thu, 11 Apr 2013 10:45:14 -0500 Subject: [PATCH] Issue #1862 - set_hydro_env now looks up db driver jar dynamically Peer review comments Change-Id: I6904da96e89930b6efa802ec6302cc7a7d36a3d9 Former-commit-id: d981d740878890b4cd2270593c8ed006d63a930c [formerly c58285e63aa18eca991ebce3c408a298b09efe8c] Former-commit-id: 13542f3d7063660fa0d88ab333862ef3051edd82 --- .../awips/hydroapps/set_hydro_env | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/nativeLib/rary.ohd.filesystem/awips/hydroapps/set_hydro_env b/nativeLib/rary.ohd.filesystem/awips/hydroapps/set_hydro_env index 196c2dadd5..f88ab8c44b 100755 --- a/nativeLib/rary.ohd.filesystem/awips/hydroapps/set_hydro_env +++ b/nativeLib/rary.ohd.filesystem/awips/hydroapps/set_hydro_env @@ -71,12 +71,19 @@ export DAMCAT_DB_NAME=$(get_apps_defaults damcat_db_name) export JDBCURL=jdbc:postgresql://$PGHOST:$PGPORT/$DB_NAME?user=$PGUSER export DAMCREST_JDBCURL=jdbc:postgresql://$PGHOST:$PGPORT/$DAMCAT_DB_NAME?user=$PGUSER -PGSQL_DRIVER_JAR=postgresql-8.3-603.jdbc3.jar if [ "${PGSQL_DRIVER_DIR}" = "" ]; then - export DB_DRIVER_PATH=${EDEX_HOME}/lib/dependencies/org.postgres/${PGSQL_DRIVER_JAR} + DB_DRIVER_DIR=${EDEX_HOME}/lib/dependencies/org.postgres else - export DB_DRIVER_PATH=${PGSQL_DRIVER_DIR}/${PGSQL_DRIVER_JAR} + DB_DRIVER_DIR=${PGSQL_DRIVER_DIR}/ fi +cd $DB_DRIVER_DIR +files=$(find . | grep postgresql | grep jar) +for i in $files +do + echo $i + PGSQL_DRIVER_JAR=$i +done +export DB_DRIVER_PATH=${DB_DRIVER_DIR}/${PGSQL_DRIVER_JAR} #=========================================================================== # This is stuff extracted from the original HYDRO_ENV