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

- added/updated return values

parent ca43cf5f
No related branches found
No related tags found
No related merge requests found
...@@ -437,6 +437,7 @@ PATCH ...@@ -437,6 +437,7 @@ PATCH
if(! -d $path && ! -f $path){ if(! -d $path && ! -f $path){
mkdir($path) or die "Could not mkdir $path: $!"; mkdir($path) or die "Could not mkdir $path: $!";
} }
return 1;
} }
sub copyFilesToMeta($$$$$$){ sub copyFilesToMeta($$$$$$){
...@@ -488,6 +489,8 @@ PATCH ...@@ -488,6 +489,8 @@ PATCH
}else{ }else{
copy($rightsFilePath, $metaPath) or die "Copy failed: $!"; copy($rightsFilePath, $metaPath) or die "Copy failed: $!";
} }
return 1;
} }
sub validateRightsXML($$){ sub validateRightsXML($$){
...@@ -543,7 +546,8 @@ PATCH ...@@ -543,7 +546,8 @@ PATCH
my $body = $p . $string; my $body = $p . $string;
printf "%" . length($body) . "s\n", colored($body, "bold $pColor") if $priority >= $VERBOSE; printf "%" . length($body) . "s\n", colored($body, "bold $pColor") if $priority >= $VERBOSE;
} }
return;
return 1;
} }
sub create_slub_bagit($$){ sub create_slub_bagit($$){
...@@ -601,6 +605,8 @@ PATCH ...@@ -601,6 +605,8 @@ PATCH
# create slub bagit # create slub bagit
print_scalar_data("", "INFO: building SIP...", "", "white"); print_scalar_data("", "INFO: building SIP...", "", "white");
SLUB::LZA::SIPBuilderBagIt::create_slub_bagit($bagPath, \@addBagInfo); SLUB::LZA::SIPBuilderBagIt::create_slub_bagit($bagPath, \@addBagInfo);
return 1;
} }
sub buildBagWithMoveOption($$$$$$$$$){ sub buildBagWithMoveOption($$$$$$$$$){
...@@ -639,6 +645,8 @@ PATCH ...@@ -639,6 +645,8 @@ PATCH
# create slub bagit # create slub bagit
print_scalar_data("", "INFO: building SIP...", "", "white"); print_scalar_data("", "INFO: building SIP...", "", "white");
SLUB::LZA::SIPBuilderBagIt::create_slub_bagit($bagPath, \@addBagInfo); SLUB::LZA::SIPBuilderBagIt::create_slub_bagit($bagPath, \@addBagInfo);
return 1;
} }
sub buildBagWithReplaceOption($$$$$$$$$){ sub buildBagWithReplaceOption($$$$$$$$$){
...@@ -677,6 +685,8 @@ PATCH ...@@ -677,6 +685,8 @@ PATCH
# create slub bagit # create slub bagit
print_scalar_data("", "INFO: building SIP...", "", "white"); print_scalar_data("", "INFO: building SIP...", "", "white");
SLUB::LZA::SIPBuilderBagIt::create_slub_bagit($bagPath, \@addBagInfo); SLUB::LZA::SIPBuilderBagIt::create_slub_bagit($bagPath, \@addBagInfo);
return 1;
} }
sub checkForTitle($){ sub checkForTitle($){
...@@ -690,8 +700,11 @@ PATCH ...@@ -690,8 +700,11 @@ PATCH
push @keys, keys %{$hash}; push @keys, keys %{$hash};
} }
# check for title # check for title
print_scalar_data("", "WARNING: No Title given. Please consider adding a human-readable title with '--add_key_value=Title:YOUR-TITLE'", "", "yellow") if (none { $_ =~ m/^[Tt][Ii][Tt][Ll][Ee]/ } @keys) {
if none { $_ =~ m/^[Tt][Ii][Tt][Ll][Ee]/ } @keys; print_scalar_data("", "WARNING: No Title given. Please consider adding a human-readable title with '--add_key_value=Title:YOUR-TITLE'", "", "yellow");
return 0;
}
return 1;
} }
# end package # end package
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment