diff --git a/PLUGIN-INF/metadata_ppa_plugin.xml b/PLUGIN-INF/metadata_ppa_plugin.xml index 3678c98ee941368069aaac8c961de535ffab3b83..f1660902e0e702688421c46bb7efc7e220d5e29e 100644 --- a/PLUGIN-INF/metadata_ppa_plugin.xml +++ b/PLUGIN-INF/metadata_ppa_plugin.xml @@ -1,10 +1,10 @@ <!-- 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>MigrationToolPlugin</pl:pluginTypeName> - <pl:deployName>Migration DUMMY Plugin</pl:deployName> + <pl:deployName>Migration Plugin DUMMY</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.2</pl:version> + <pl:version>0.3</pl:version> <pl:materialType>DIGITAL</pl:materialType> <pl:generalType>TASK</pl:generalType> <pl:implType>script</pl:implType> diff --git a/plugin/ppa_plugin.sh b/plugin/ppa_plugin.sh index a6150aa2ba30a075e4245a5ac3197031056903de..eb36f529e68f5c6b5b26169046f495ccdf0e29a1 100755 --- a/plugin/ppa_plugin.sh +++ b/plugin/ppa_plugin.sh @@ -3,18 +3,20 @@ ######### # 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/ +# with modifications as suggested by SupportCase 00712430 # by: Jörg Sachse, Joerg.Sachse@slub-dresden.de -# at: 2019-07-29 -# last shellcheck run: 2019-07-29 13:06 +# created at: 2019-07-29 +# last shellcheck run: 2019-10-17 15:10 ######### # wrap all but the last two parameters for (( i=1; i<$#-1; i=i+1 )); do - ARGS="$ARGS ${!i}" + ARGS="$ARGS ${!i}" done -INPUT_FILE="${!i}" -i=$(( i+1 )) +INPUT_PATH="${!i}" +INPUT_FILE="$( basename ${INPUT_PATH} )" +(( i++ )) OUTPUT_DIR="${!i}" if [[ ! -e "${OUTPUT_DIR}" ]]; then @@ -22,6 +24,6 @@ if [[ ! -e "${OUTPUT_DIR}" ]]; then fi # cp "$INPUT_FILE" "$ARGS" "$OUTPUT_DIR/$INPUT_FILE" -cp "$INPUT_FILE" "$OUTPUT_DIR/$INPUT_FILE" +cp "$INPUT_PATH" "$OUTPUT_DIR/$INPUT_FILE" exit $?