<commit_before>#!/bin/bash

#########################################
# Install tools on a new VM
# Example of usage:
#   ./new-vm.sh
#########################################

# Variables
VM_USER="vagrant"
REPO_PATH="/home/$VM_USER/mr_robot"

# Confirmation function
confirm () {
    # call with a prompt string or use a default
    read -r -p "${1} (y/n) " response
    case $response in
        [yY][eE][sS]|[yY]) 
            true
            ;;
        *)
            false
            ;;
    esac
}

confirm  "Install curl ?" && 
sudo apt-get install curl -y &&
echo 

confirm "Install Git ?" &&
sudo apt-get install git -y &&
echo

confirm "Install Eclipse ?" &&
cd "/home/$VM_USER/" &&
wget "http://www.eclipse.org/downloads/download.php?file=/technology/epp/downloads/release/helios/SR2/eclipse-cpp-helios-SR2-linux-gtk-x86_64.tar.gz" -O "eclipse.tar.gz" &&
sudo tar -xvf eclipse.tar.gz &&
sudo rm *.tar.gz &&
echo

confirm "Install Java JDK 7 ?" &&
sudo apt-get install openjdk-7-jdk -y &&
echo

confirm "Install Java JDK 8 ?" &&
sudo add-apt-repository ppa:openjdk-r/ppa -y &&
sudo apt-get update &&
sudo apt-get install openjdk-8-jdk &&
echo

confirm "Install g++ 4.9 and gcc 4.9 ?" &&
sudo apt-get install build-essential -y &&
sudo add-apt-repository ppa:ubuntu-toolchain-r/test -y &&
sudo apt-get update &&
sudo apt-get install gcc-4.9 g++-4.9 cpp-4.9 -y &&
cd /usr/bin &&
sudo rm gcc g++ cpp &&<commit_msg>Added vim to script<commit_after>#!/bin/bash

#########################################
# Install tools on a new VM
# Example of usage:
#   ./new-vm.sh
#########################################

# Variables
VM_USER="vagrant"
REPO_PATH="/home/$VM_USER/mr_robot"

# Confirmation function
confirm () {
    # call with a prompt string or use a default
    read -r -p "${1} (y/n) " response
    case $response in
        [yY][eE][sS]|[yY]) 
            true
            ;;
        *)
            false
            ;;
    esac
}

confirm  "Install curl ?" && 
sudo apt-get install curl -y &&
echo 

confirm "Install vim ?" &&
sudo apt-get install vim -y &&
echo

confirm "Install Git ?" &&
sudo apt-get install git -y &&
echo

confirm "Install Eclipse ?" &&
cd "/home/$VM_USER/" &&
wget "http://www.eclipse.org/downloads/download.php?file=/technology/epp/downloads/release/helios/SR2/eclipse-cpp-helios-SR2-linux-gtk-x86_64.tar.gz" -O "eclipse.tar.gz" &&
sudo tar -xvf eclipse.tar.gz &&
sudo rm *.tar.gz &&
echo

confirm "Install Java JDK 7 ?" &&
sudo apt-get install openjdk-7-jdk -y &&
echo

confirm "Install Java JDK 8 ?" &&
sudo add-apt-repository ppa:openjdk-r/ppa -y &&
sudo apt-get update &&
sudo apt-get install openjdk-8-jdk &&
echo

confirm "Install g++ 4.9 and gcc 4.9 ?" &&
sudo apt-get install build-essential -y &&
sudo add-apt-repository ppa:ubuntu-toolchain-r/test -y &&
sudo apt-get update &&
sudo apt-get install gcc-4.9 g++-4.9 cpp-4.9 -y &&
cd /usr/bin &&
sudo rm gcc g++ cpp &&
{'fraction_non_alphanumeric': 0.20487302676733013, 'fraction_numerical': 0.014413177762525738, 'mean_word_length': 2.987688098495212, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 6, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3698006', 'n_tokens_mistral': 1121, 'n_tokens_neox': 1020, 'n_words': 282}