Skip to content

Commit

Permalink
Add ability to find README in non-compressed tarballs
Browse files Browse the repository at this point in the history
  • Loading branch information
mlangill committed Jun 24, 2011
1 parent 3d0e721 commit 325ea14
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion scripts/upload_to_biotorrents.pl
Expand Up @@ -192,7 +192,7 @@

}else{

#seach in gzip tarballs
#seach in gzip tarballs
if($dataset =~ /.*\.(tar.gz)|(tgz)/){
my @README = `tar -xzOf $dataset --wildcards --ignore-case *readme*`;
if(@README == 0){
Expand All @@ -209,6 +209,15 @@
next INPUT;
}
$description = join( '', @README );

#search in non-compressed tarballs
}elsif($dataset =~ /.*\.(tar)/){
my @README = `tar -xOf $dataset --wildcards --ignore-case *readme*`;
if(@README == 0){
print "No REAMDE file exists or is empty in the dataset: $dataset. Ensure that there is a README file with a description in it or use the -d option.\n";
next INPUT;
}
$description = join( '', @README );

#search in zipped directories
}elsif($dataset =~ /.*\.(zip)/){
Expand Down

0 comments on commit 325ea14

Please sign in to comment.