update install scripts to use updated config master branch
[sitka/sitka-tools.git] / marc_export_custom / fetch-shortcodes.sh
... / ...
CommitLineData
1#!/bin/bash
2SHORTCODES=$1
3if [ -z "${SHORTCODES}" ]; then
4 SHORTCODES="shortcodes.csv"
5fi
6psql -Upostgres -U evergreen evergreen -h prod-pg96-db2-sitka -o $SHORTCODES \
7-c "COPY (
8 SELECT
9 a.shortname,a.name,b.shortname AS parent
10 FROM actor.org_unit a
11 JOIN actor.org_unit b
12 ON (a.parent_ou = b.id)
13 ORDER BY shortname
14 ) TO STDOUT WITH CSV HEADER QUOTE AS '\"' FORCE QUOTE shortname, name, parent;"
15