Make it easy to override the PGHOST parameter from within the Backstage
processor. This way we don't have to modify and reset the value from
within CRON when we want to use a DB host that is not the system
default.
Signed-off-by: Bill Erickson <berickxx@gmail.com>
$0
Options
+ -d <db-host> - overrides global PGHOST for this script.
+ MAKE THIS THE FIRST SCRIPT PARAMETER IF SET.
+
-a Import monthly authority update file.
-b Create and upload quarterly bib export
}
-while getopts "abqh" opt; do
+while getopts "abqhd:" opt; do
case $opt in
+ d) export PGHOST=$OPTARG;;
a) bs_import_monthly_auths;;
q) bs_import_qtrly_results;;
b) bs_export_qtrly_bibs;;