Skip to content

Commit

Permalink
Merge pull request #151 from sbesson/regen_memo_files_db_option
Browse files Browse the repository at this point in the history
regen-memo-files: use the --db argument when supplied
  • Loading branch information
sbesson authored Jan 8, 2025
2 parents 4db5987 + 294e861 commit a2c6e0d
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/dist/regen-memo-files.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit a2c6e0d

Please sign in to comment.