Skip to content
Snippets Groups Projects
Commit f4374176 authored by Jens Steidl's avatar Jens Steidl :baby_chick:
Browse files

- updated test script: added argument check, simplified classpath

parent b6422178
Branches
Tags
No related merge requests found
#!/bin/bash #!/bin/bash
EXL=/exlibris/dps/d4_1/system.dir/dps-sdk-7.1.0/
java -cp \ # check arguments
"${EXL}/lib/dps-sdk-7.1.0.jar:${EXL}/dps-sdk-projects/dps-sdk-deposit/lib/log4j-1.2.14.jar:\ if [ "$#" -lt 1 ]; then echo "error: no media file given"; exit 1; fi
${EXL}/dps-sdk-projects/dps-sdk-deposit/lib/commons-codec-1.10.jar:\ if [ ! -f "$1" ]; then echo "error: media file '$1' does not exist"; exit 1; fi
${EXL}/dps-sdk-projects/dps-sdk-deposit/lib/xmlbeans-2.3.0.jar:\
/usr/share/java/commons-lang.jar:./SLUBTechnicalMetadataExtractorMediaConchPlugin.jar" \ # set variables
org.slub.rosetta.dps.repository.plugin.SLUBTechnicalMetadataExtractorMediaConchPlugin \ MEDIA_FILE="$1";
"$1" ROSETTAVERSION="7.1.0"
ROSETTA_SDK_DIR="/exlibris/dps/d4_1/system.dir/dps-sdk-${ROSETTAVERSION}"
ROSETTA_SDK_JAR="${ROSETTA_SDK_DIR}/lib/dps-sdk-${ROSETTAVERSION}.jar"
PLUGIN_JAR="./SLUBTechnicalMetadataExtractorMediaConchPlugin.jar"
PLUGIN_NAME="org.slub.rosetta.dps.repository.plugin.SLUBTechnicalMetadataExtractorMediaConchPlugin"
# run plugin
java -cp "${ROSETTA_SDK_JAR}:${PLUGIN_JAR}" "${PLUGIN_NAME}" "${MEDIA_FILE}"
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment