Skip to content

Instantly share code, notes, and snippets.

@joost
Created November 27, 2012 12:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save joost/4154029 to your computer and use it in GitHub Desktop.
Save joost/4154029 to your computer and use it in GitHub Desktop.
Solr 4.0 brew recipe
require 'formula'
class Solr < Formula
url 'http://www.apache.org/dyn/closer.cgi?path=lucene/solr/4.0.0/apache-solr-4.0.0.tgz'
homepage 'http://lucene.apache.org/solr/'
sha1 '0cb61d9572516fc627785201b79b3a85e95f877d'
def script; <<-EOS.undent
#!/bin/sh
if [ -z "$1" ]; then
echo "Usage: $ solr 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+'solr').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
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment