<commit_before>require 'formula'

SOLR_START_SCRIPT = <<-end_script
#!/bin/sh
if [ -z "$1" ]; then
  echo "Usage: $ solr path/to/config/dir"
else 
  cd %s/example && java -Dsolr.solr.home=$1 -jar start.jar
fi
end_script

class Solr <Formula
  url 'http://apache.deathculture.net/lucene/solr/1.3.0/apache-solr-1.3.0.tgz'
  homepage 'http://lucene.apache.org/solr/'
  md5 '23774b077598c6440d69016fed5cc810'

  def install
    system "mkdir -p #{prefix}"
    system "mv * #{prefix}"
    (bin+'solr').write(SOLR_START_SCRIPT % prefix)
  end

  def caveats<commit_msg>Use Ruby commands in preference to UNIX commands<commit_after>require 'formula'

SOLR_START_SCRIPT = <<-end_script
#!/bin/sh
if [ -z "$1" ]; then
  echo "Usage: $ solr path/to/config/dir"
else 
  cd %s/example && java -Dsolr.solr.home=$1 -jar start.jar
fi
end_script

class Solr <Formula
  url 'http://apache.deathculture.net/lucene/solr/1.3.0/apache-solr-1.3.0.tgz'
  homepage 'http://lucene.apache.org/solr/'
  md5 '23774b077598c6440d69016fed5cc810'

  def install
    prefix.mkpath
    prefix.install Dir['*']
    (bin+'solr').write(SOLR_START_SCRIPT % prefix)
  end

  def caveats
{'fraction_non_alphanumeric': 0.15082824760244115, 'fraction_numerical': 0.05754141238012206, 'mean_word_length': 3.7049180327868854, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5647122', 'n_tokens_mistral': 518, 'n_tokens_neox': 464, 'n_words': 92}