<commit_before>#!/bin/bash

# Author: <NAME>
# Copyright: 2015, <NAME> (www.albertopettarin.it)
# License: GNU AGPL v3
# Version: 1.2.0
# Email: <EMAIL>
# Status: Production

DEB="deb-multimedia-keyring_2015.6.1_all.deb"
DIR="aeneas"

if ! [ -e "$DIR" ]
then
    echo "[INFO] Setting vagrant box up..."

    echo "[INFO] A.1 Adding some popular Debian mirrors to apt sources..."
    sudo sh -c 'echo "" >> /etc/apt/sources.list'
    sudo sh -c 'echo "deb http://debian.ethz.ch/debian/ jessie main" >> /etc/apt/sources.list'
    sudo sh -c 'echo "deb-src http://debian.ethz.ch/debian/ jessie main" >> /etc/apt/sources.list'
    sudo sh -c 'echo "" >> /etc/apt/sources.list'
    sudo sh -c 'echo "deb http://debian.csail.mit.edu/debian/ jessie main" >> /etc/apt/sources.list'
    sudo sh -c 'echo "deb-src http://debian.csail.mit.edu/debian/ jessie main" >> /etc/apt/sources.list'
    sudo sh -c 'echo "" >> /etc/apt/sources.list'
    sudo sh -c 'echo "deb http://mirror.cse.unsw.edu.au/debian/ jessie main" >> /etc/apt/sources.list'
    sudo sh -c 'echo "deb-src http://mirror.cse.unsw.edu.au/debian/ jessie main" >> /etc/apt/sources.list'
    sudo sh -c 'echo "" >> /etc/apt/sources.list'
    echo "[INFO] A.1 Adding some popular Debian mirrors to apt sources... done"

    echo "[INFO] A.2 Downloading and installing deb-multimedia keyring..."
    wget -t 5 "http://www.deb-multimedia.org/pool/main/d/deb-multimedia-keyring/$DEB"
    if ! [ -e "$DEB" ]
    then
        echo "[ERRO] Cannot download the deb-multimedia keyring."
        echo "[ERRO] This might be due to a temporary network or server problem."
        echo "[ERRO] Please retry installing this Vagrant box later."
        echo "[ERRO] If the problem persists, please send an email to <EMAIL>"
        exit 1
    fi
    sudo dpkg -i "$DEB"
    rm "$DEB"
    echo "[INFO] A.2 Downloading and installing deb-multimedia keyring... done"

    echo "[INFO] A.3 Adding deb-multimedia to apt sources..."
    sudo sh -c 'echo "deb http://www.deb-multimedia.org jessie main" >> /etc/apt/sources.list'
    echo "[INFO] A.3 Adding deb-multimedia to apt sources... done"

    echo "[INFO] A.4 Updating apt..."
    sudo apt-get update
    echo "[INFO] A.4 Updating apt... done"

    echo "[INFO] B.1 Installing ffmpeg (from deb-multimedia)..."
    sudo apt-get install -y ffmpeg
    echo "[INFO] B.1 Installing ffmpeg (from deb-multimedia)... done"

    echo "[INFO] B.2 Installing espeak..."
    sudo apt-get install -y espeak*<commit_msg>Creating entries for mirrors instead of modifying sources.list<commit_after>#!/bin/bash

# Author: <NAME>
# Copyright: 2015, <NAME> (www.albertopettarin.it)
# License: GNU AGPL v3
# Version: 1.2.0
# Email: <EMAIL>
# Status: Production

DEB="deb-multimedia-keyring_2015.6.1_all.deb"
DIR="aeneas"

if ! [ -e "$DIR" ]
then
    echo "[INFO] Setting vagrant box up..."

    echo "[INFO] A.1 Adding some popular Debian mirrors to apt sources..."
    #
    # append to /etc/apt/sources.list
    #
    #sudo sh -c 'echo "" >> /etc/apt/sources.list'
    #sudo sh -c 'echo "deb http://debian.ethz.ch/debian/ jessie main" >> /etc/apt/sources.list'
    #sudo sh -c 'echo "deb-src http://debian.ethz.ch/debian/ jessie main" >> /etc/apt/sources.list'
    #sudo sh -c 'echo "" >> /etc/apt/sources.list'
    #sudo sh -c 'echo "deb http://debian.csail.mit.edu/debian/ jessie main" >> /etc/apt/sources.list'
    #sudo sh -c 'echo "deb-src http://debian.csail.mit.edu/debian/ jessie main" >> /etc/apt/sources.list'
    #sudo sh -c 'echo "" >> /etc/apt/sources.list'
    #sudo sh -c 'echo "deb http://mirror.cse.unsw.edu.au/debian/ jessie main" >> /etc/apt/sources.list'
    #sudo sh -c 'echo "deb-src http://mirror.cse.unsw.edu.au/debian/ jessie main" >> /etc/apt/sources.list'
    #sudo sh -c 'echo "" >> /etc/apt/sources.list'
    #
    # create entries in /etc/apt/sources.list.d/
    #
    sudo sh -c 'echo "deb http://debian.ethz.ch/debian/ jessie main" >> /etc/apt/sources.list.d/ethz.list'
    sudo sh -c 'echo "deb-src http://debian.ethz.ch/debian/ jessie main" >> /etc/apt/sources.list.d/ethz.list'
    sudo sh -c 'echo "deb http://debian.csail.mit.edu/debian/ jessie main" >> /etc/apt/sources.list.d/mit.list'
    sudo sh -c 'echo "deb-src http://debian.csail.mit.edu/debian/ jessie main" >> /etc/apt/sources.list.d/mit.list'
    sudo sh -c 'echo "deb http://mirror.cse.unsw.edu.au/debian/ jessie main" >> /etc/apt/sources.list.d/unsw.list'
    sudo sh -c 'echo "deb-src http://mirror.cse.unsw.edu.au/debian/ jessie main" >> /etc/apt/sources.list.d/unsw.list'
    echo "[INFO] A.1 Adding some popular Debian mirrors to apt sources... done"

    echo "[INFO] A.2 Downloading and installing deb-multimedia keyring..."
    wget -t 5 "http://www.deb-multimedia.org/pool/main/d/deb-multimedia-keyring/$DEB"
    if ! [ -e "$DEB" ]
    then
        echo "[ERRO] Cannot download the deb-multimedia keyring."
        echo "[ERRO] This might be due to a temporary network or server problem."
        echo "[ERRO] Please retry installing this Vagrant box later."
        echo "[ERRO] If the problem persists, please send an email to <EMAIL>"
        exit 1
    fi
    sudo dpkg -i "$DEB"
    rm "$DEB"
    echo "[INFO] A.2 Downloading and installing deb-multimedia keyring... done"

    echo "[INFO] A.3 Adding deb-multimedia to apt sources..."
    sudo sh -c 'echo "" >> /etc/apt/sources.list'
    sudo sh -c 'echo "deb http://www.deb-multimedia.org jessie main" >> /etc/apt/sources.list'
    sudo sh -c 'echo "" >> /etc/apt/sources.list'
    echo "[INFO] A.3 Adding deb-multimedia to apt sources... done"

    echo "[INFO] A.4 Updating apt..."
    sudo apt-get update
    echo "[INFO] A.4 Updating apt... done"

    echo "[INFO] B.1 Installing ffmpeg (from deb-multimedia)..."
    sudo apt-get install -y ffmpeg
    echo "[INFO] B.1 Installing ffmpeg (from deb-multimedia)... done"

    echo "[INFO] B.2 Installing espeak..."
    sudo apt-get install -y espeak*
{'fraction_non_alphanumeric': 0.16340970350404313, 'fraction_numerical': 0.009097035040431268, 'mean_word_length': 2.708307307932542, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 71, 'https://': 0, 'lorem ipsum': 0, 'www.': 6, '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': '1099960', 'n_tokens_mistral': 2271, 'n_tokens_neox': 2101, 'n_words': 621}