<commit_before>#!/bin/bash

umask 0077
bin=$HOME/usr/bin

function ensure_line () {
  line="$1" file="$2"
  grep -qFx "$line" "$file" || echo "$line" >> "$file"
}

test -d ~/.vagrant.d && \
ensure_line "$(cat ~/run_control/vagrant/loader.rb)" ~/.vagrant.d/Vagrantfile

# TODO: /opt/vagrant/bin/* ?
# At that point it's probably better to just put it back in $PATH.

for script in vagrant; do
  ln -sf /opt/vagrant/bin/$script $bin/$script
done

plugin () {
  vagrant plugin list | grep -F "$1" || \
  vagrant plugin install "$@"
}

if which vagrant &> /dev/null; then

  # Make .env available in Vagrantfile.
  plugin vagrant-env

  # Make guest notify-send propagate to host.
  plugin vagrant-notify

  # Add functionality to vagrant commands/events.
  plugin vagrant-triggers

  # Auto-install virtualbox guest additions.
  plugin vagrant-vbguest

fi

# TODO: test -e $bin/packer || unzip<commit_msg>Remove vagrant-notify plugin for now<commit_after>#!/bin/bash

umask 0077
bin=$HOME/usr/bin

function ensure_line () {
  line="$1" file="$2"
  grep -qFx "$line" "$file" || echo "$line" >> "$file"
}

test -d ~/.vagrant.d && \
ensure_line "$(cat ~/run_control/vagrant/loader.rb)" ~/.vagrant.d/Vagrantfile

# TODO: /opt/vagrant/bin/* ?
# At that point it's probably better to just put it back in $PATH.

for script in vagrant; do
  ln -sf /opt/vagrant/bin/$script $bin/$script
done

plugin () {
  vagrant plugin list | grep -F "$1" || \
  vagrant plugin install "$@"
}

if which vagrant &> /dev/null; then

  # Make .env available in Vagrantfile.
  plugin vagrant-env

  # Make guest notify-send propagate to host.
  #plugin vagrant-notify

  # Add functionality to vagrant commands/events.
  plugin vagrant-triggers

  # Auto-install virtualbox guest additions.
  plugin vagrant-vbguest

fi

# TODO: test -e $bin/packer || unzip
{'fraction_non_alphanumeric': 0.1422319474835886, 'fraction_numerical': 0.007658643326039387, 'mean_word_length': 3.3966346153846154, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 9, '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': '6094217', 'n_tokens_mistral': 683, 'n_tokens_neox': 654, 'n_words': 195}