<commit_before>require 'formula'

class Bash <Formula
  @url='http://ftp.gnu.org/gnu/bash/bash-4.0.tar.gz'
  @homepage='http://www.gnu.org/software/bash/'
  @md5='a90a1b5a6db4838483f05438e05e8eb9'

  depends_on 'readline'

  def install
    system "./configure", "--prefix=#{prefix}", "--disable-debug", "--disable-dependency-tracking"
    system "make install"
  end
end<commit_msg>Fixes #92; Updated bash formula to 4.1 and added ability to get patches from bash site depending on patch level<commit_after>require 'formula'

class Bash <Formula
  url 'http://ftp.gnu.org/gnu/bash/bash-4.1.tar.gz'
  homepage 'http://www.gnu.org/software/bash/'
  sha1 '3bd1ec9c66f3689f6b3495bdaaf9077b2e5dc150'
  version '4.1.2'

  depends_on 'readline'

  def patches
    patch_level = version.split('.').last.to_i
    {'p0' => (1..patch_level).map { |i| "http://ftp.gnu.org/gnu/bash/bash-4.1-patches/bash41-%03d" % i }}
  end

  def install
    system "./configure", "--prefix=#{prefix}", "--disable-debug", "--disable-dependency-tracking"
    system "make install"
  end
end
{'fraction_non_alphanumeric': 0.16760828625235405, 'fraction_numerical': 0.06120527306967985, 'mean_word_length': 3.766816143497758, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 4, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, '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': '3182976', 'n_tokens_mistral': 444, 'n_tokens_neox': 394, 'n_words': 77}