Created
September 4, 2014 18:11
-
-
Save snreid/07891f14866d0b96cd11 to your computer and use it in GitHub Desktop.
DSpace SAF import shell script
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# First parameter is the handle of the collection, e.g. '1811/12345' | |
# Second parameter is the directory that contains our batch, | |
# which should include the SimpleArchiveFormat directory. | |
# Usage example: | |
# ./import-saf-2dsp.sh 1811/12345 /mnt/common/dspace/OARDC_bulletin_PDF | |
# The 'mapfile' and 'log' will be new files created by this process. | |
# The 'mapfile' is used if something goes wrong to delete the batch, see 'delete.sh'. | |
# If this is a re-do of a previous attempt to import a batch, then any | |
# previously created mapfile needs to be removed first. (AFTER using it to delete the previous attempt.) | |
if [[ $# -eq 0 ]] ; then | |
echo "Be sure to specify the handle of the collection first (e.g. '1811/12345') and the directory that contains the batch second. (e.g. /mnt/common/dspace/batch_for_uploading)" | |
exit 0 | |
fi | |
/dspace/bin/dspace import -a -e libkbhelp@lists.osu.edu -c $1 -s $2/SimpleArchiveFormat/ -m $2/mapfile-2dsp >& $2/log-2dsp |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment