<commit_before>#!/bin/bash
# This is a quick and dirty script to setup an openSUSE based development
# environment form Jangouts and it's intended to be used by Vagrant when
# setting up the machine.

set -x

#
# Installing Janus Gateway. This will take a while..."
#
sudo zypper ar -f --no-gpgcheck -r http://download.opensuse.org/repositories/home:/mlin7442:/hackweek11/openSUSE_13.2/home:mlin7442:hackweek11.repo
# FIXME: we need this because of a conflict with libnice.
sudo zypper -q -n remove patterns-openSUSE-minimal_base-conflicts
sudo zypper -q -n in janus-gateway

#
# Generating self-signed certificate for Janus Gateway
#
if [ ! -f /usr/share/janus/certs/mycert.pem ]
then
  sudo openssl req -x509 -sha256 -nodes -days 365 -newkey rsa:2048 \
    -keyout /usr/share/janus/certs/mycert.key \
    -out /usr/share/janus/certs/mycert.pem -subj "/C=DE/ST=/L=/O=/CN=jangouts.local"
fi

#
# Starting Janus service
#
sudo systemctl start janus.service
sudo systemctl enable janus.service

#
# Installing Janguts requirements
#
sudo zypper -q -n in git
# FIXME: in the future, packages for openSUSE should be used.
if [ ! -d /home/vagrant/.nvm ]
then
  curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.25.4/install.sh | bash
  source ~/.nvm/nvm.sh
  nvm install stable
  nvm alias default stable
  npm install -g bower gulp
fi

#
# Install NPM and Bower packages.
#
[[ ! -d node_modules ]] && mkdir node_modules
cd /home/vagrant/jangouts
[[ ! -L node_modules ]] && ln -s ../node_modules
npm install && bower install
<commit_msg>Remove 'quiet' option for zypper when provisioning<commit_after>#!/bin/bash
# This is a quick and dirty script to setup an openSUSE based development
# environment form Jangouts and it's intended to be used by Vagrant when
# setting up the machine.

set -x

#
# Installing Janus Gateway. This will take a while..."
#
sudo zypper ar -f --no-gpgcheck -r http://download.opensuse.org/repositories/home:/mlin7442:/hackweek11/openSUSE_13.2/home:mlin7442:hackweek11.repo
# FIXME: we need this because of a conflict with libnice.
sudo zypper -n remove patterns-openSUSE-minimal_base-conflicts
sudo zypper -n in janus-gateway

#
# Generating self-signed certificate for Janus Gateway
#
if [ ! -f /usr/share/janus/certs/mycert.pem ]
then
  sudo openssl req -x509 -sha256 -nodes -days 365 -newkey rsa:2048 \
    -keyout /usr/share/janus/certs/mycert.key \
    -out /usr/share/janus/certs/mycert.pem -subj "/C=DE/ST=/L=/O=/CN=jangouts.local"
fi

#
# Starting Janus service
#
sudo systemctl start janus.service
sudo systemctl enable janus.service

#
# Installing Janguts requirements
#
sudo zypper -n in git
# FIXME: in the future, packages for openSUSE should be used.
if [ ! -d /home/vagrant/.nvm ]
then
  curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.25.4/install.sh | bash
  source ~/.nvm/nvm.sh
  nvm install stable
  nvm alias default stable
  npm install -g bower gulp
fi

#
# Install NPM and Bower packages.
#
[[ ! -d node_modules ]] && mkdir node_modules
cd /home/vagrant/jangouts
[[ ! -L node_modules ]] && ln -s ../node_modules
npm install && bower install

{'fraction_non_alphanumeric': 0.11271676300578035, 'fraction_numerical': 0.020552344251766216, 'mean_word_length': 3.560761346998536, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4473220', 'n_tokens_mistral': 1201, 'n_tokens_neox': 1113, 'n_words': 341}