Skip to content

Instantly share code, notes, and snippets.

@xmorave2
Created March 23, 2018 07:13
Show Gist options
  • Select an option

  • Save xmorave2/4112421015c8eb4d1e441053abdd882f to your computer and use it in GitHub Desktop.

Select an option

Save xmorave2/4112421015c8eb4d1e441053abdd882f to your computer and use it in GitHub Desktop.
autority.sh
#!/bin/bash
export KOHA_CONF=/etc/koha/sites/usti/koha-conf.xml
export PERL5LIB=/usr/share/koha/lib
#for bn in $(echo 'SELECT biblionumber FROM biblio ORDER BY biblionumber LIMIT 10000, 10000;' | koha-mysql usti)
for bn in $(echo 'SELECT biblionumber FROM virtualshelfcontents where shelfnumber = 7;' | koha-mysql usti)
do
if [ "$bn" != "biblionumber" ]; then
/usr/share/koha/bin/link_bibs_to_authorities.pl -v --bib-limit="biblionumber = $bn";
koha-rebuild-zebra usti
fi;
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment