-
-
Notifications
You must be signed in to change notification settings - Fork 12.7k
/
Copy pathparallel.rb
55 lines (46 loc) · 1.67 KB
/
parallel.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
51
52
53
54
55
class Parallel < Formula
desc "Shell command parallelization utility"
homepage "https://savannah.gnu.org/projects/parallel/"
url "https://ftp.gnu.org/gnu/parallel/parallel-20250322.tar.bz2"
mirror "https://ftpmirror.gnu.org/parallel/parallel-20250322.tar.bz2"
sha256 "c82896e779b18c2a157527f32f35de9a6d984f8b8ebad2b41dbc78c33adbaabe"
license "GPL-3.0-or-later"
version_scheme 1
head "https://git.savannah.gnu.org/git/parallel.git", branch: "master"
livecheck do
url :homepage
regex(/GNU Parallel v?(\d{6,8}).*? released/i)
end
bottle do
sha256 cellar: :any_skip_relocation, all: "4485af6cbea6ea6fe9bdc37bb5a92046e59d5571d5d69ff41fe88e518976996b"
end
conflicts_with "moreutils", because: "both install a `parallel` executable"
def install
ENV.append_path "PATH", bin
system "./configure", "--prefix=#{prefix}"
system "make", "install"
bash_completion.install share/"bash-completion/completions/parallel"
inreplace_files = [
bin/"parallel",
doc/"parallel.texi",
doc/"parallel_design.texi",
doc/"parallel_examples.texi",
man1/"parallel.1",
man7/"parallel_design.7",
man7/"parallel_examples.7",
]
# Ignore `inreplace` failures when building from HEAD or not building a bottle.
inreplace inreplace_files, "/usr/local", HOMEBREW_PREFIX, build.stable? && build.bottle?
end
def caveats
<<~EOS
To use the --csv option, the Perl Text::CSV module has to be installed.
You can install it via:
perl -MCPAN -e'install Text::CSV'
EOS
end
test do
assert_equal "test\ntest\n",
shell_output("#{bin}/parallel --will-cite echo ::: test test")
end
end