forked from lotia/homebrew-versions
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsolr14.rb
38 lines (31 loc) · 900 Bytes
/
solr14.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
class Solr14 < Formula
desc "Enterprise search platform from Apache Lucene project"
homepage "https://lucene.apache.org/solr/"
url "https://archive.apache.org/dist/lucene/solr/1.4.1/apache-solr-1.4.1.tgz"
sha256 "d795bc477335b3e29bab7073b385c93fca4be867aae345203da0d1e438d7543f"
depends_on :java
conflicts_with "solr", :because => "Differing versions of same formula"
def script; <<-EOS.undent
#!/bin/sh
if [ -z "$1" ]; then
echo "Usage: $ solr14 path/to/config/dir"
else
cd #{libexec}/example && java -Dsolr.solr.home=$1 -jar start.jar
fi
EOS
end
def install
libexec.install Dir["*"]
(bin+"solr14").write script
end
def caveats; <<-EOS.undent
To start solr:
solr path/to/solr/config/dir
See the solr homepage for more setup information:
brew home solr
EOS
end
test do
system "solr14"
end
end