| 1 | #!/bin/bash |
| 2 | |
| 3 | cd /srv/openils/bin |
| 4 | |
| 5 | DATABASE=evergreen |
| 6 | FULL_QUERY="select id from biblio.record_entry where not deleted" |
| 7 | POSTSEC_QUERY="select * FROM asset.call_number where owning_lib in (select id from actor.org_unit_descendants(27)) and not deleted and label != '##URI##';" |
| 8 | |
| 9 | # full dump for outlook public libraries |
| 10 | psql -A -t -c "$FULL_QUERY" $DATABASE\ |
| 11 | |./marc_export_custom --config /srv/openils/conf/opensrf_core.xml --items --location SITKA --collapse_to_depth 2 --exclusion_ini sitka_full_outlook.ini |
| 12 | |
| 13 | # media for BC ELN post-secondary libraries |
| 14 | psql -A -t -c "$POSTSEC_QUERY" $DATABASE\ |
| 15 | |./marc_export_custom --config /srv/openils/conf/opensrf_core.xml --items --location SITKA --collapse_to_depth 2 --exclusion_ini bc_eln_media.ini |
| 16 | ~ |
| 17 | # serials for BC ELN post-secondary libraries |
| 18 | psql -A -t -c "$POSTSEC_QUERY" $DATABASE\ |
| 19 | |./marc_export_custom --config /srv/openils/conf/opensrf_core.xml --items --location SITKA --collapse_to_depth 2 --exclusion_ini bc_eln_serials.ini |