Update db hostname, modify depth per org tree adjustment, remove obsolete config...
[sitka/sitka-tools.git] / marc_export_custom / fetch-shortcodes.sh
index fb8f6f4..4c91014 100755 (executable)
@@ -1,5 +1,9 @@
 #!/bin/bash 
-psql -Upostgres -U evergreen evergreen -h db1.bclibraries.ca -o shortcodes.csv \
+SHORTCODES=$1
+if [ -z "${SHORTCODES}" ]; then
+    SHORTCODES="shortcodes.csv"
+fi
+psql -Upostgres -U evergreen evergreen -h dbprod-96-main-ndb2 -o $SHORTCODES \
 -c "COPY (
       SELECT
         a.shortname,a.name,b.shortname AS parent