<commit_before>#!/bin/zsh

DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
cd "$DIR"

notify () {
  echo -e "--------------------------------------------------------------------------"
  echo -e "--- $1"
  echo -e "--------------------------------------------------------------------------"
}

notify-start () {
  notify "INSTALLING $1"
}

notify-end () {
  notify "INSTALLED $1"
  echo -e "\n"
}

PATH="$(brew --prefix jenv):$PATH"
eval "$(jenv init -)"
for i in $(ls /Library/Java/JavaVirtualMachines/); do
  notify-start "JENV VERSION: $i"
  eval "jenv add /Library/Java/JavaVirtualMachines/${i}/Contents/Home"
  notify-end "JENV VERSION: $i"
done

PYENV_VERSIONS=(
  $(pyenv install -l | sed -e 's/^[ \t]*//' | egrep '^2(.[[:digit:]]+)+$' | tail -n 1)
  $(pyenv install -l | sed -e 's/^[ \t]*//' | egrep '^3(.[[:digit:]]+)+$' | tail -n 1)
)
for i in "${PYENV_VERSIONS[@]}"; do
  notify-start "PYTHON $i"
  pyenv install $i
  notify-end "PYTHON $i"
done

. "$(brew --prefix nvm)/nvm.sh"
NVM_LTS_VERSIONS=$(nvm ls-remote | sed -e 's/^[ \t]*//' | egrep '^v' | grep "Latest" | awk -F ' ' '{print $1}' | tail -n 1)
for i in "${NVM_LTS_VERSIONS[@]}"; do
  notify-start "NVM LTS $i"
  nvm install $i
  notify-end "NVM LTS $i"
done

NVM_LATEST_VERSION=$(nvm ls-remote | sed -e 's/^[ \t]*//' | egrep '^v[[:digit:]]*(.[[:digit:]]*)*$' | tail -n 1)
notify-start "NVM LATEST $NVM_LATEST_VERSION"
nvm install $NVM_LATEST_VERSION
notify-end "NVM LATEST $NVM_LATEST_VERSION"<commit_msg>Install multiple NVM lts versions<commit_after>#!/bin/zsh

DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
cd "$DIR"

notify () {
  echo -e "--------------------------------------------------------------------------"
  echo -e "--- $1"
  echo -e "--------------------------------------------------------------------------"
}

notify-start () {
  notify "INSTALLING $1"
}

notify-end () {
  notify "INSTALLED $1"
  echo -e "\n"
}

PATH="$(brew --prefix jenv):$PATH"
eval "$(jenv init -)"
for i in $(ls /Library/Java/JavaVirtualMachines/); do
  notify-start "JENV VERSION: $i"
  eval "jenv add /Library/Java/JavaVirtualMachines/${i}/Contents/Home"
  notify-end "JENV VERSION: $i"
done

PYENV_VERSIONS=(
  $(pyenv install -l | sed -e 's/^[ \t]*//' | egrep '^2(.[[:digit:]]+)+$' | tail -n 1)
  $(pyenv install -l | sed -e 's/^[ \t]*//' | egrep '^3(.[[:digit:]]+)+$' | tail -n 1)
)
for i in "${PYENV_VERSIONS[@]}"; do
  notify-start "PYTHON $i"
  pyenv install $i
  notify-end "PYTHON $i"
done

. "$(brew --prefix nvm)/nvm.sh"
NVM_LTS_VERSIONS=(
  $(nvm ls-remote | sed -e 's/^[ \t]*//' | egrep '^v' | sed -e 's/v//g' | grep "Latest" | awk -F ' ' '{print $1}')
)
for i in "${NVM_LTS_VERSIONS[@]}"; do
  notify-start "NVM LTS $i"
  nvm install $i
  notify-end "NVM LTS $i"
done

NVM_LATEST_VERSION=$(nvm ls-remote | sed -e 's/^[ \t]*//' | egrep '^v[[:digit:]]*(.[[:digit:]]*)*$' | tail -n 1)
notify-start "NVM LATEST $NVM_LATEST_VERSION"
nvm install $NVM_LATEST_VERSION
notify-end "NVM LATEST $NVM_LATEST_VERSION"
{'fraction_non_alphanumeric': 0.3112074716477652, 'fraction_numerical': 0.007004669779853236, 'mean_word_length': 2.3248337028824833, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '5684286', 'n_tokens_mistral': 1241, 'n_tokens_neox': 1193, 'n_words': 306}