From 294e861fd272eed43560678acc574ad71114fb4e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Besson?= Date: Tue, 10 Dec 2024 16:32:34 +0000 Subject: [PATCH] regen-memo-files: use the --db argument when supplied --- src/dist/regen-memo-files.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/dist/regen-memo-files.sh b/src/dist/regen-memo-files.sh index 5918b9d4..e99431e8 100755 --- a/src/dist/regen-memo-files.sh +++ b/src/dist/regen-memo-files.sh @@ -161,8 +161,10 @@ else DB_HOST=$( grep omero.db.host ${MS_CONFIG} |awk -F: '{ print $2 }' | sed -re 's/\s+//g' -e 's/\"//g') DB_NAME=$( grep omero.db.name ${MS_CONFIG} |awk -F: '{ print $2 }' | sed -re 's/\s+//g' -e 's/\"//g') DB_PASS=$( grep omero.db.pass ${MS_CONFIG} |awk -F: '{ print $2 }' | sed -re 's/\s+//g' -e 's/\"//g') + PSQL_OPTIONS="postgresql://${DB_USER:-omero}:${DB_PASS:-omero}@${DB_HOST:-localhost}:${DB_PORT:-5432}/${DB_NAME:-omero}" + else + PSQL_OPTIONS=${DB} fi - PSQL_OPTIONS="postgresql://${DB_USER:-omero}:${DB_PASS:-omero}@${DB_HOST:-localhost}:${DB_PORT:-5432}/${DB_NAME:-omero}" psql ${PSQL_OPTIONS} omero -f ${MEMOIZER_HOME}/memo_regenerator.sql > ${FULL_CSV} fi [ -n "${DRYRUN}" ] && set -x