forked from ahmadia/homebrew-science
-
Notifications
You must be signed in to change notification settings - Fork 0
/
velvetoptimiser.rb
50 lines (45 loc) · 1.34 KB
/
velvetoptimiser.rb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
class Velvetoptimiser < Formula
homepage "http://bioinformatics.net.au/software.velvetoptimiser.shtml"
url "http://www.vicbioinformatics.com/VelvetOptimiser-2.2.5.tar.gz"
sha256 "a7c2f213dff80f8448081a15a487a55cb5e3432f836763bcb5c38abc800af503"
head "https://github.com/Victorian-Bioinformatics-Consortium/VelvetOptimiser.git"
depends_on "velvet"
depends_on "Bio::Perl" => :perl
def install
bin.install "VelvetOptimiser.pl"
(lib / "perl").install "VelvetOpt"
end
# Fix shebang to use the perl found in PATH.
# Remove GNU-specific flag --preserve-root passed to 'rm'.
patch :DATA
test do
system "VelvetOptimiser.pl --version"
end
end
__END__
--- VelvetOptimiser-2.2.5/VelvetOptimiser.pl 2012-10-22 22:18:23.000000000 -0400
+++ VelvetOptimiser-2.2.5/VelvetOptimiser.pl.fixed 2013-04-09 12:42:19.000000000 -0400
@@ -1,4 +1,4 @@
-#!/usr/bin/perl
+#!/usr/bin/env perl
#
# VelvetOptimiser.pl
#
@@ -31,7 +31,7 @@
#
use POSIX qw(strftime);
use FindBin;
-use lib "$FindBin::Bin";
+use lib "$FindBin::RealBin/../lib/perl";
use threads;
use threads::shared;
use VelvetOpt::Assembly;
@@ -386,7 +386,7 @@
foreach my $key(keys %assemblies){
unless($key == $bestId){
my $dir = $assembliesObjs{$key}->{ass_dir};
- system('rm', '-r', '--preserve-root', $dir);
+ system('rm', '-r', $dir);
}
}
unless ($finaldir eq "."){