diff options
| author | Mike McQuaid | 2015-01-12 13:42:23 +0000 |
|---|---|---|
| committer | Mike McQuaid | 2015-01-12 13:44:48 +0000 |
| commit | 614ec4ea8b4a28e21c2ad653575c6db33dccadb5 (patch) | |
| tree | 8454788243611bc3cb4430770bf7857c7a2f3629 /Library/Formula | |
| parent | cf9cb2b527f8beba0c55c3b9a5ce14ba07dc4868 (diff) | |
| download | homebrew-614ec4ea8b4a28e21c2ad653575c6db33dccadb5.tar.bz2 | |
duck: simplify revision calculation.
Diffstat (limited to 'Library/Formula')
| -rw-r--r-- | Library/Formula/duck.rb | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Library/Formula/duck.rb b/Library/Formula/duck.rb index d6c869eab..9c5fcfb78 100644 --- a/Library/Formula/duck.rb +++ b/Library/Formula/duck.rb @@ -16,7 +16,8 @@ class Duck < Formula depends_on "ant" => :build def install - system "ant", "-Dbuild.compile.target=1.7", "-Drevision=#{version.to_str[/(\d\.\d(\.\d)?)\.(\d+)/, 3]}", "cli" + revision = version.to_s.rpartition(".").last + system "ant", "-Dbuild.compile.target=1.7", "-Drevision=#{revision}", "cli" libexec.install Dir["build/duck.bundle/*"] bin.install_symlink "#{libexec}/Contents/MacOS/duck" => "duck" end |
