<commit_before>#!/usr/bin/env bash

source "$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)/../util.sh"

install() {
  if [[ $OS != 'Darwin' ]]; then
    log "os is not macOS"
  fi

  if command_exist brew; then
    log "brew already installed"
    exit 0
  fi

  /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
}

[[ 0 = $# || "-i" = $1 || "i" = $1 ]] && install && exit 0
exit 1
<commit_msg>update brew.sh<commit_after>#!/usr/bin/env bash

source "$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)/../util.sh"

install() {
  if [[ $OS != 'Darwin' ]]; then
    log "os is not macOS"
  fi

  if command_exist brew; then
    log "brew already installed"
    exit 0
  fi

  /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
}

uninstall() {
  if ! command_exist brew; then
    log "brew is not exist"
    exit 0
  fi

  /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/uninstall)"
}

case "$1" in
  -i|--install|i|install)
    install
    ;;
  -u|--uninstall|u|uninstall)
    uninstall
    ;;
  *)
    echo "nothing to do ..."
    exit 1
esac

exit 0

{'fraction_non_alphanumeric': 0.18596787827557057, 'fraction_numerical': 0.01098901098901099, 'mean_word_length': 2.8193548387096774, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 3, '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': '3896278', 'n_tokens_mistral': 478, 'n_tokens_neox': 441, 'n_words': 113}