#!/usr/bin/env bash # import.sh - give a set of MARC records, insert them into Koha # configure BULKMARCIMPORT=/usr/share/koha/bin/migration_tools/bulkmarcimport.pl CONF=/etc/koha/sites/catalog/koha-conf.xml LIB=/usr/share/koha/lib # initialize export KOHA_CONF=$CONF export PERL5LIB=$LIB # sanity check if [[ -z $1 ]]; then echo "Usage: $0 " >&2 exit fi # get input MARC=$1 # do the work and done perl $BULKMARCIMPORT -v 1 -d -b -commit 1000 -file $MARC exit