<commit_before>#:  @hide_from_man_page
#:  * `vendor-install` [<target>]
#:
#:  Install Homebrew's portable Ruby.

# HOMEBREW_CURLRC, HOMEBREW_LIBRARY, HOMEBREW_STDERR is from the user environment
# HOMEBREW_CACHE, HOMEBREW_CURL, HOMEBREW_LINUX, HOMEBREW_LINUX_MINIMUM_GLIBC_VERSION, HOMEBREW_MACOS,
# HOMEBREW_MACOS_VERSION_NUMERIC and HOMEBREW_PROCESSOR are set by brew.sh
# shellcheck disable=SC2154
source "${HOMEBREW_LIBRARY}/Homebrew/utils/lock.sh"

VENDOR_DIR="${HOMEBREW_LIBRARY}/Homebrew/vendor"

# Built from https://github.com/Homebrew/homebrew-portable-ruby.
if [[ -n "${HOMEBREW_MACOS}" ]]
then
  if [[ "${HOMEBREW_PROCESSOR}" == "Intel" &&
        "$(sysctl -n machdep.cpu.brand_string)" != "Apple"* ]] ||
     # Handle the case where /usr/local/bin/brew is run under arm64.
     # It's a x86_64 installation there (we refuse to install arm64 binaries) so
     # use a x86_64 Portable Ruby.
     [[ "${HOMEBREW_PROCESSOR}" == "arm64" && "${HOMEBREW_PREFIX}" == "/usr/local" ]]
  then
    ruby_FILENAME="portable-ruby-2.6.8.yosemite.bottle.tar.gz"
    ruby_SHA="0cb1cc7af109437fe0e020c9f3b7b95c3c709b140bde9f991ad2c1433496dd42"
  elif [[ "${HOMEBREW_PROCESSOR}" == "arm64" ]]
  then
    ruby_FILENAME="portable-ruby-2.6.8.arm64_big_sur.bottle.tar.gz"
    ruby_SHA="f2d5cab5a4dd49e5b3de780a3cd0a1f61642fea247d1c25aa40cd43f1be290b5"
  fi
elif [[ -n "${HOMEBREW_LINUX}" ]]
then
  case "${HOMEBREW_PROCESSOR}" in
    x86_64)
      ruby_FILENAME="portable-ruby-2.6.8.x86_64_linux.bottle.tar.gz"
      ruby_SHA="cd7fffb18ef9338baa670fc5e8fce99b0e3cc0f0fd7627bcbb56f3c8d54161d4"
      ;;<commit_msg>Install Portable Ruby on native ARM installs<commit_after>#:  @hide_from_man_page
#:  * `vendor-install` [<target>]
#:
#:  Install Homebrew's portable Ruby.

# HOMEBREW_CURLRC, HOMEBREW_LIBRARY, HOMEBREW_STDERR is from the user environment
# HOMEBREW_CACHE, HOMEBREW_CURL, HOMEBREW_LINUX, HOMEBREW_LINUX_MINIMUM_GLIBC_VERSION, HOMEBREW_MACOS,
# HOMEBREW_MACOS_VERSION_NUMERIC and HOMEBREW_PROCESSOR are set by brew.sh
# shellcheck disable=SC2154
source "${HOMEBREW_LIBRARY}/Homebrew/utils/lock.sh"

VENDOR_DIR="${HOMEBREW_LIBRARY}/Homebrew/vendor"

# Built from https://github.com/Homebrew/homebrew-portable-ruby.
if [[ -n "${HOMEBREW_MACOS}" ]]
then
  if [[ "${HOMEBREW_PROCESSOR}" == "Intel" &&
        "$(sysctl -n machdep.cpu.brand_string)" != "Apple"* ]] ||
     # Handle the case where /usr/local/bin/brew is run under arm64.
     # It's a x86_64 installation there (we refuse to install arm64 binaries) so
     # use a x86_64 Portable Ruby.
     [[ "${HOMEBREW_PROCESSOR}" == "arm64" && "${HOMEBREW_PREFIX}" == "/usr/local" ]]
  then
    ruby_FILENAME="portable-ruby-2.6.8.yosemite.bottle.tar.gz"
    ruby_SHA="0cb1cc7af109437fe0e020c9f3b7b95c3c709b140bde9f991ad2c1433496dd42"
  elif [[ "$(sysctl -n machdep.cpu.brand_string)" == "Apple"* ]]
  then
    ruby_FILENAME="portable-ruby-2.6.8.arm64_big_sur.bottle.tar.gz"
    ruby_SHA="f2d5cab5a4dd49e5b3de780a3cd0a1f61642fea247d1c25aa40cd43f1be290b5"
  fi
elif [[ -n "${HOMEBREW_LINUX}" ]]
then
  case "${HOMEBREW_PROCESSOR}" in
    x86_64)
      ruby_FILENAME="portable-ruby-2.6.8.x86_64_linux.bottle.tar.gz"
      ruby_SHA="cd7fffb18ef9338baa670fc5e8fce99b0e3cc0f0fd7627bcbb56f3c8d54161d4"
      ;;
{'fraction_non_alphanumeric': 0.1319828115408226, 'fraction_numerical': 0.08778391651319828, 'mean_word_length': 5.012915129151292, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 2, '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': '3383732', 'n_tokens_mistral': 1590, 'n_tokens_neox': 1365, 'n_words': 202}