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

# Verify Git is installed, otherwise suggest running bootstrap:
if [ ! $(which git) ]; then
  echo "Git is not installed."
  exit
fi

# Set where rbenv is going to be installed:
if (( UID == 0 )) ; then
  RBENV_ROOT="/usr/local/rbenv"
  PROFILE="/etc/profile.d/rbenv.sh"
else
  RBENV_ROOT="${HOME}/.rbenv"
  PROFILE="${HOME}/.bash_profile"
fi

# Install rbenv:
if [ ! -d "$RBENV_ROOT" ] ; then
  git clone git://github.com/sstephenson/rbenv.git $RBENV_ROOT
else
  pushd $RBENV_ROOT; git pull; popd
fi

# Install plugins:
PLUGINS=( "sstephenson:rbenv-vars"
          "sstephenson:ruby-build"
          "jamis:rbenv-gemset"
          "chriseppstein:rbenv-each"
          "carsomyr:rbenv-bundler" )

for plugin in ${PLUGINS[@]} ; do

  KEY=${plugin%%:*}
  VALUE=${plugin#*:}

  RBENV_PLUGIN_ROOT="${RBENV_ROOT}/plugins/$VALUE"
  if [ ! -d "$RBENV_PLUGIN_ROOT" ] ; then
    git clone git://github.com/$KEY/$VALUE.git $RBENV_PLUGIN_ROOT
  else
    pushd $RBENV_PLUGIN_ROOT; git pull; popd
  fi

done

if [ ! -f "$PROFILE" ] ; then
  # Add rbenv to the path:
  cat << EOF > $PROFILE
# rbenv setup
export RBENV_ROOT="$RBENV_ROOT"
export PATH="$RBENV_ROOT/bin:\$PATH"
eval "\$(rbenv init -)"
EOF
fi<commit_msg>If touching profile notify the user.<commit_after>#!/usr/bin/env bash

# Verify Git is installed, otherwise suggest running bootstrap:
if [ ! $(which git) ]; then
  echo "Git is not installed."
  exit
fi

# Set where rbenv is going to be installed:
if (( UID == 0 )) ; then
  RBENV_ROOT="/usr/local/rbenv"
  PROFILE="/etc/profile.d/rbenv.sh"
else
  RBENV_ROOT="${HOME}/.rbenv"
  PROFILE="${HOME}/.bash_profile"
fi

# Install rbenv:
if [ ! -d "$RBENV_ROOT" ] ; then
  git clone git://github.com/sstephenson/rbenv.git $RBENV_ROOT
else
  pushd $RBENV_ROOT; git pull; popd
fi

# Install plugins:
PLUGINS=( "sstephenson:rbenv-vars"
          "sstephenson:ruby-build"
          "jamis:rbenv-gemset"
          "chriseppstein:rbenv-each"
          "carsomyr:rbenv-bundler" )

for plugin in ${PLUGINS[@]} ; do

  KEY=${plugin%%:*}
  VALUE=${plugin#*:}

  RBENV_PLUGIN_ROOT="${RBENV_ROOT}/plugins/$VALUE"
  if [ ! -d "$RBENV_PLUGIN_ROOT" ] ; then
    git clone git://github.com/$KEY/$VALUE.git $RBENV_PLUGIN_ROOT
  else
    pushd $RBENV_PLUGIN_ROOT; git pull; popd
  fi

done

if [ ! -f "$PROFILE" ] ; then
  echo "=> Adding rbenv to the path. ($PROFILE)"
  # Add rbenv to the path:
  cat << EOF > $PROFILE
# rbenv setup
export RBENV_ROOT="$RBENV_ROOT"
export PATH="$RBENV_ROOT/bin:\$PATH"
eval "\$(rbenv init -)"
EOF
fi
{'fraction_non_alphanumeric': 0.15423861852433282, 'fraction_numerical': 0.0007849293563579278, 'mean_word_length': 3.5517857142857143, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 6, 'https://': 0, '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': '4966940', 'n_tokens_mistral': 1028, 'n_tokens_neox': 994, 'n_words': 233}