<commit_before>class UutilsCoreutils < Formula
  desc "Cross-platform Rust rewrite of the GNU coreutils"
  homepage "https://github.com/uutils/coreutils"
  url "https://github.com/uutils/coreutils/archive/0.0.8.tar.gz"
  sha256 "11a975110bf75151106b491666b4087a25c9c753f697ee0125fa52c567042bc0"
  license "MIT"
  head "https://github.com/uutils/coreutils.git", branch: "master"

  bottle do
    sha256 cellar: :any_skip_relocation, arm64_monterey: "8e4cf365ecfff4fe42f9c21a3f9ba64fd2d15a7f14ded65ac8f30d0764f73911"
    sha256 cellar: :any_skip_relocation, arm64_big_sur:  "58f80ecda7962fa1818085961891b5218e66ed8fe2f86f38277a3e302c6992be"
    sha256 cellar: :any_skip_relocation, monterey:       "b076abc6627fcff4f6c4135d6848976375c997ec949eaba8b5d19a7615973e4e"
    sha256 cellar: :any_skip_relocation, big_sur:        "78d1eeffa6a52aa3d932fb0082bccff6456f53b025d77d672035f177c5c6307f"
    sha256 cellar: :any_skip_relocation, catalina:       "d4848d8fa8174ec3c6b12ea3a88739be534f309ace404b050b32273f65a3bb9f"
    sha256 cellar: :any_skip_relocation, x86_64_linux:   "83aace8e74a5ed355a5bd0a87e255772c130104391924a72851ad3a3fbc60f08"
  end

  depends_on "make" => :build
  depends_on "rust" => :build
  depends_on "sphinx-doc" => :build

  conflicts_with "coreutils", because: "uutils-coreutils and coreutils install the same binaries"
  conflicts_with "aardvark_shell_utils", because: "both install `realpath` binaries"
  conflicts_with "truncate", because: "both install `truncate` binaries"

  def install
    man1.mkpath

    ENV.prepend_path "PATH", Formula["make"].opt_libexec/"gnubin"

    system "make", "install",
           "PROG_PREFIX=u",
           "PREFIX=#{prefix}",
           "SPHINXBUILD=#{Formula["sphinx-doc"].opt_bin}/sphinx-build"

    # Symlink all commands into libexec/uubin without the 'u' prefix
    coreutils_filenames(bin).each do |cmd|
      (libexec/"uubin").install_symlink bin/"u#{cmd}" => cmd
    end

    # Symlink all man(1) pages into libexec/uuman without the 'u' prefix
    coreutils_filenames(man1).each do |cmd|
      (libexec/"uuman"/"man1").install_symlink man1/"u#{cmd}" => cmd
    end
<commit_msg>uutils-coreutils 0.0.9<commit_after>class UutilsCoreutils < Formula
  desc "Cross-platform Rust rewrite of the GNU coreutils"
  homepage "https://github.com/uutils/coreutils"
  url "https://github.com/uutils/coreutils/archive/0.0.9.tar.gz"
  sha256 "eba8b545eb495757980c1599e9aca0e8df231856afce03586cb86e69edd993b4"
  license "MIT"
  head "https://github.com/uutils/coreutils.git", branch: "master"

  bottle do
    sha256 cellar: :any_skip_relocation, arm64_monterey: "8e4cf365ecfff4fe42f9c21a3f9ba64fd2d15a7f14ded65ac8f30d0764f73911"
    sha256 cellar: :any_skip_relocation, arm64_big_sur:  "58f80ecda7962fa1818085961891b5218e66ed8fe2f86f38277a3e302c6992be"
    sha256 cellar: :any_skip_relocation, monterey:       "b076abc6627fcff4f6c4135d6848976375c997ec949eaba8b5d19a7615973e4e"
    sha256 cellar: :any_skip_relocation, big_sur:        "78d1eeffa6a52aa3d932fb0082bccff6456f53b025d77d672035f177c5c6307f"
    sha256 cellar: :any_skip_relocation, catalina:       "d4848d8fa8174ec3c6b12ea3a88739be534f309ace404b050b32273f65a3bb9f"
    sha256 cellar: :any_skip_relocation, x86_64_linux:   "83aace8e74a5ed355a5bd0a87e255772c130104391924a72851ad3a3fbc60f08"
  end

  depends_on "make" => :build
  depends_on "rust" => :build
  depends_on "sphinx-doc" => :build

  conflicts_with "coreutils", because: "uutils-coreutils and coreutils install the same binaries"
  conflicts_with "aardvark_shell_utils", because: "both install `realpath` binaries"
  conflicts_with "truncate", because: "both install `truncate` binaries"

  # build patch for `failed to select a version for the requirement `uu_stdbuf = "^0.0.8"``
  # remove in next release
  patch do
    url "https://github.com/uutils/coreutils/commit/c5e2515833f8eefc12fe65f0a3ffba7cbfea0ff9.patch?full_index=1"
    sha256 "e3ca918c02bbb22e280739e80933353c74af8aec54887f0b4343082c4f19dea2"
  end

  def install
    man1.mkpath

    ENV.prepend_path "PATH", Formula["make"].opt_libexec/"gnubin"

    system "make", "install",
           "PROG_PREFIX=u",
           "PREFIX=#{prefix}",
           "SPHINXBUILD=#{Formula["sphinx-doc"].opt_bin}/sphinx-build"

    # Symlink all commands into libexec/uubin without the 'u' prefix
    coreutils_filenames(bin).each do |cmd|
      (libexec/"uubin").install_symlink bin/"u#{cmd}" => cmd
    end

    # Symlink all man(1) pages into libexec/uuman without the 'u' prefix
    coreutils_filenames(man1).each do |cmd|
      (libexec/"uuman"/"man1").install_symlink man1/"u#{cmd}" => cmd
    end

{'fraction_non_alphanumeric': 0.099935107073329, 'fraction_numerical': 0.15422885572139303, 'mean_word_length': 5.076215505913272, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 13, 'https://': 7, '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': '7527933', 'n_tokens_mistral': 2222, 'n_tokens_neox': 1852, 'n_words': 293}