Skip to content

Commit

Permalink
Merge pull request #47 from amiaopensource/more-db-integration
Browse files Browse the repository at this point in the history
moved ingestschemas
  • Loading branch information
privatezero authored Feb 10, 2017
2 parents 4b3d718 + 5c69c1b commit ec03c0a
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions ingestschemas
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
#!/bin/bash
SCRIPTDIR=$(dirname $(which "${0}"))
. "${SCRIPTDIR}/mmfunctions"

if [ -d "${1}" ] ; then
cd "${1}"
else
Echo "Please use a valid directory for input - Exiting" && exit 0
fi

if [ -z "${PREMIS_NAME}" ] || [ "${PREMIS_DB}" != "Y" ] ; then
echo "Please configure database options in mmconfig. Exiting"
fi

for i in *.schema ; do
xmlschema="${i}"
MEDIA_ID=$(basename "${xmlschema}" | cut -d'.' -f1)
eventType="ingest"
_report_to_db
_report_schema_db
_eventoutcome_update
done

0 comments on commit ec03c0a

Please sign in to comment.