ingest.sh 527 Bytes
#!/bin/bash

# find all PDF files
# find . -type f -name '*.pdf' -exec ./ingest.sh {} \;

while [[ $# > 1 ]]
do
    echo $1
    shift # past argument or value
done

mylogger() {
  echo "$(date +%F\ %H:%M:%S:%N): $@"
}


mylogger "start ingesting DOI from PDF: $file"

# Ingest
# based on DSPACE doc - https://wiki.duraspace.org/display/DSDOC18/Importing+and+Exporting+Items+via+Simple+Archive+Format
/dspace/bin/dspace import --add --eperson=sama-saw@asa.fccn.pt --collection=10400.25/300 --source=/tmp/test --mapfile=mapfile1