<commit_before>#!/usr/bin/env bash
cd "$(dirname "$0")"

brew_install () {
  if [ ! -d "$(brew --prefix "$1")" ]; then
    echo "Installing $1."
    brew install "$1"
  fi
}

cask_install () {
  echo "Installing $1."
  brew cask install "$1"
}

# install homebrew
if [ ! -x "$(which brew)" ]; then
  echo "Installing Homebrew."
  ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
fi

brew prune
brew doctor
brew update
brew upgrade

brew tap homebrew/dupes

# install brews
for brew in {coreutils,findutils,zsh,openssl,openssh,wget,curl,rsync,git,python,ruby,node,vim}; do
  brew_install "$brew"
done

brew cask doctor

# install brew casks
for cask in {google-chrome,iterm2,atom,visual-studio-code}; do
  cask_install "$cask"
done

unset brew
unset brew_install
unset cask
unset cask_install

brew cleanup<commit_msg>update brew.sh<commit_after>#!/usr/bin/env bash
cd "$(dirname "$0")"

brew_install () {
  if [ ! -d "$(brew --prefix "$1")" ]; then
    echo "Installing $1."
    brew install "$1"
  fi
}

cask_install () {
  echo "Installing $1."
  brew cask install "$1"
}

# install homebrew
if [ ! -x "$(which brew)" ]; then
  echo "Installing Homebrew."
  ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
fi

brew prune
brew doctor
brew update
brew upgrade

brew tap homebrew/dupes

# install brews
for brew in {coreutils,findutils,zsh,openssl,openssh,wget,curl,rsync,git,python,ruby,node,vim}; do
  brew_install "$brew"
done
unset brew_install
unset brew

brew cask doctor

# install brew casks
for cask in {google-chrome,iterm2,atom,visual-studio-code}; do
  cask_install "$cask"
done
unset cask_install
unset cask

brew cleanup
{'fraction_non_alphanumeric': 0.1357808857808858, 'fraction_numerical': 0.008158508158508158, 'mean_word_length': 4.332298136645963, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '267065', 'n_tokens_mistral': 647, 'n_tokens_neox': 618, 'n_words': 176}