<commit_before>#!/bin/bash

working_dir=`dirname $0`

cd $working_dir

set -u
set -o  errexit

if [ `getconf LONG_BIT` != '64' ]; then
    echo "Install failed, you must have a 64 bit OS."
    exit 1
fi

echo "Installing Perlbrew..."
curl -L http://install.perlbrew.pl | bash

echo "Loading Perlbrew environment variables..."
set +u
source ~/perl5/perlbrew/etc/bashrc
set -u

echo "Running 'perlbrew init'..."
perlbrew init

echo "Running 'perlbrew install'..."
nice perlbrew install perl-5.16.3 -Duseithreads -Dusemultiplicity -Duse64bitint -Duse64bitall -Duseposix -Dusethreads -Duselargefiles -Dccflags=-DDEBIAN

echo "Switching to installed Perl..."
perlbrew switch perl-5.16.3

echo "Installing cpanm..."
perlbrew install-cpanm

echo "Creating 'mediacloud' library..."
perlbrew lib create mediacloud<commit_msg>Don't show progress bar, show errors when fetching Perlbrew<commit_after>#!/bin/bash

working_dir=`dirname $0`

cd $working_dir

set -u
set -o  errexit

if [ `getconf LONG_BIT` != '64' ]; then
    echo "Install failed, you must have a 64 bit OS."
    exit 1
fi

echo "Installing Perlbrew..."
curl -LsS http://install.perlbrew.pl | bash

echo "Loading Perlbrew environment variables..."
set +u
source ~/perl5/perlbrew/etc/bashrc
set -u

echo "Running 'perlbrew init'..."
perlbrew init

echo "Running 'perlbrew install'..."
nice perlbrew install perl-5.16.3 -Duseithreads -Dusemultiplicity -Duse64bitint -Duse64bitall -Duseposix -Dusethreads -Duselargefiles -Dccflags=-DDEBIAN

echo "Switching to installed Perl..."
perlbrew switch perl-5.16.3

echo "Installing cpanm..."
perlbrew install-cpanm

echo "Creating 'mediacloud' library..."
perlbrew lib create mediacloud
{'fraction_non_alphanumeric': 0.11904761904761904, 'fraction_numerical': 0.02261904761904762, 'mean_word_length': 3.9881305637982196, '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': '4973804', 'n_tokens_mistral': 643, 'n_tokens_neox': 586, 'n_words': 185}