diff --git a/PLUGIN_INF/meta.xml b/PLUGIN_INF/meta.xml new file mode 100644 index 0000000000000000000000000000000000000000..925c83da20778153ac4860f9af2d82d61a032333 --- /dev/null +++ b/PLUGIN_INF/meta.xml @@ -0,0 +1,24 @@ +<!-- Documentation: https://developers.exlibrisgroup.com/rosetta/integrations/plugins/ --> +<pl:metadata-config xmlns:pl="http://www.exlibrisgroup.com/Plugins/1.0/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> + <pl:pluginTypeName>MigrationPlugin</pl:pluginTypeName> + <pl:deployName>Migration DUMMY Plugin</pl:deployName> + <pl:description>Dummy for a MigrationPlugin that just copies original file to new file</pl:description> + <pl:module>Preservation</pl:module> + <pl:version>0.1</pl:version> + <pl:materialType>DIGITAL</pl:materialType> + <pl:generalType>TASK</pl:generalType> + <pl:implType>script</pl:implType> + <pl:contactPerson> + <contact_info xmlns="http://www.exlibrisgroup.com/Plugins/1.0/"> + <contactType>admin</contactType> + <firstName>Jörg</firstName> + <lastName>Sachse</lastName> + <telephone1>+49 351 4677 216</telephone1> + <email>Joerg.Sachse@slub-dresden.de</email> + <address1>Zellescher Weg 18</address1> + <address2>Dresden</address2> + <zipCode>01069</zipCode> + <country>Germany</country> + </contact_info> + </pl:contactPerson> +</pl:metadata-config> \ No newline at end of file diff --git a/plugin/ppa_plugin.sh b/plugin/ppa_plugin.sh new file mode 100755 index 0000000000000000000000000000000000000000..a6150aa2ba30a075e4245a5ac3197031056903de --- /dev/null +++ b/plugin/ppa_plugin.sh @@ -0,0 +1,27 @@ +#!/bin/bash + +######### +# Documentation: https://developers.exlibrisgroup.com/rosetta/integrations/plugins/migrationtool/ +# shamelessly copied and slightly modified from: https://developers.exlibrisgroup.com/blog/Creating-a-Migration-Tool-Split-Plug-in/ +# by: Jörg Sachse, Joerg.Sachse@slub-dresden.de +# at: 2019-07-29 +# last shellcheck run: 2019-07-29 13:06 +######### + +# wrap all but the last two parameters +for (( i=1; i<$#-1; i=i+1 )); do + ARGS="$ARGS ${!i}" +done + +INPUT_FILE="${!i}" +i=$(( i+1 )) +OUTPUT_DIR="${!i}" + +if [[ ! -e "${OUTPUT_DIR}" ]]; then + mkdir -p "${OUTPUT_DIR}" +fi + +# cp "$INPUT_FILE" "$ARGS" "$OUTPUT_DIR/$INPUT_FILE" +cp "$INPUT_FILE" "$OUTPUT_DIR/$INPUT_FILE" + +exit $?