<commit_before>require 'formula'

class ScmManager < Formula
  homepage 'http://www.scm-manager.org'
  url 'http://maven.scm-manager.org/nexus/content/repositories/releases/sonia/scm/scm-server/1.38/scm-server-1.38-app.tar.gz'
  version '1.38'
  sha1 'e9b5664296062d7b086f4c36be482f92cd3b741e'

  skip_clean 'libexec/var/log'

  resource 'client' do
    url 'http://maven.scm-manager.org/nexus/content/repositories/releases/sonia/scm/clients/scm-cli-client/1.38/scm-cli-client-1.38-jar-with-dependencies.jar'
    sha1 'dba688d277ce13cf31f5962a6d261e976c474a2a'
  end

  def install
    rm_rf Dir['bin/*.bat']

    libexec.install Dir['*']

    (bin/'scm-server').write <<-EOS.undent
      #!/bin/bash
      BASEDIR="#{libexec}"
      REPO="#{libexec}/lib"
      export JAVA_HOME=$(/usr/libexec/java_home -v 1.6)
      "#{libexec}/bin/scm-server" "$@"
    EOS
    chmod 0755, bin/'scm-server'

    tools = libexec/'tools'
    tools.install resource('client')<commit_msg>scm-manager 1.39<commit_after>require 'formula'

class ScmManager < Formula
  homepage 'http://www.scm-manager.org'
  url 'http://maven.scm-manager.org/nexus/content/repositories/releases/sonia/scm/scm-server/1.39/scm-server-1.39-app.tar.gz'
  version '1.39'
  sha1 'f0b6f6999db62480378b3f6d7ab57170af625b05'

  skip_clean 'libexec/var/log'

  resource 'client' do
    url 'http://maven.scm-manager.org/nexus/content/repositories/releases/sonia/scm/clients/scm-cli-client/1.39/scm-cli-client-1.39-jar-with-dependencies.jar'
    sha1 '2ee4c1d8275c38281ce1311795ebab50bc493eb4'
  end

  def install
    rm_rf Dir['bin/*.bat']

    libexec.install Dir['*']

    (bin/'scm-server').write <<-EOS.undent
      #!/bin/bash
      BASEDIR="#{libexec}"
      REPO="#{libexec}/lib"
      export JAVA_HOME=$(/usr/libexec/java_home -v 1.6)
      "#{libexec}/bin/scm-server" "$@"
    EOS
    chmod 0755, bin/'scm-server'

    tools = libexec/'tools'
    tools.install resource('client')
{'fraction_non_alphanumeric': 0.1628026790314271, 'fraction_numerical': 0.07882534775888717, 'mean_word_length': 3.4337899543378994, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 3, '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': '4402109', 'n_tokens_mistral': 899, 'n_tokens_neox': 794, 'n_words': 94}