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

- prevent unfinished SIP directories by checking catalog first

parent 89699f2c
No related branches found
No related tags found
No related merge requests found
......@@ -585,6 +585,11 @@ PATCH
my @addBagInfo = @{ $refAddBagInfo };
my ($mods, $marc21);
# get descriptive metadata from catalog
if ($ppn) {
$marc21 = get_marc21_from_catalogue($ppn);
$mods = get_mods_from_marc21($marc21);
}
# create bag dir
SLUB::LZA::SIPBuilderBagIt::createDir($bagPath);
# create data dir
......@@ -592,11 +597,6 @@ PATCH
# copy payload files to data
print_scalar_data("", "INFO: copying original data...", "", "white");
dircopy($ieDirectory, $dataPath) || die ("Error coping $ieDirectory to $dataPath");
# get descriptive metadata from catalog
if ($ppn) {
$marc21 = get_marc21_from_catalogue($ppn);
$mods = get_mods_from_marc21($marc21);
}
# create meta dir
SLUB::LZA::SIPBuilderBagIt::createDir($metaPath);
# copy not payload files to meta
......@@ -627,16 +627,16 @@ PATCH
my @addBagInfo = @{ $refAddBagInfo };
my ($mods, $marc21);
# create bag dir
SLUB::LZA::SIPBuilderBagIt::createDir($bagPath);
# move payloads to data dir (which is automatically renamed from IE Directory)
print_scalar_data("", "INFO: moving original data...", "", "white");
dirmove($ieDirectory, $dataPath) || die ("Error moving $ieDirectory to $dataPath");
# get descriptive metadata from catalog
if ($ppn) {
$marc21 = get_marc21_from_catalogue($ppn);
$mods = get_mods_from_marc21($marc21);
}
# create bag dir
SLUB::LZA::SIPBuilderBagIt::createDir($bagPath);
# move payloads to data dir (which is automatically renamed from IE Directory)
print_scalar_data("", "INFO: moving original data...", "", "white");
dirmove($ieDirectory, $dataPath) || die ("Error moving $ieDirectory to $dataPath");
# create meta dir
SLUB::LZA::SIPBuilderBagIt::createDir($metaPath);
# copy not payload files to meta
......@@ -667,16 +667,16 @@ PATCH
my @addBagInfo = @{ $refAddBagInfo };
my ($mods, $marc21);
# create bag dir
SLUB::LZA::SIPBuilderBagIt::createDir($bagPath);
# move payloads to data dir (which is automatically renamed from IE Directory)
print_scalar_data("", "INFO: moving original data...", "", "white");
dirmove($ieDirectory, $dataPath) || die ("Error moving $ieDirectory to $dataPath");
# get descriptive metadata from catalog
if ($ppn) {
$marc21 = get_marc21_from_catalogue($ppn);
$mods = get_mods_from_marc21($marc21);
}
# create bag dir
SLUB::LZA::SIPBuilderBagIt::createDir($bagPath);
# move payloads to data dir (which is automatically renamed from IE Directory)
print_scalar_data("", "INFO: moving original data...", "", "white");
dirmove($ieDirectory, $dataPath) || die ("Error moving $ieDirectory to $dataPath");
# create meta dir
SLUB::LZA::SIPBuilderBagIt::createDir($metaPath);
# copy not payload files to meta
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment