<commit_before>#!/bin/bash

set -e

NODE_VERSION="v0.10.24"
NODE_PLATFORM="linux"
NODE_ARCH="x64"
NODE_DOWNLOAD_URL="http://nodejs.org/dist/$NODE_VERSION/node-$NODE_VERSION-$NODE_PLATFORM-$NODE_ARCH.tar.gz"

mkdir -p ../node
NODE_DIR="`(cd ../node && pwd)`"

install_node() {
    echo "------> Installing nodejs $NODE_VERSION"
    (
        cd "$NODE_DIR"
        curl -# "$NODE_DOWNLOAD_URL" | tar xz --strip-components=1
    )
}

if [ ! -e ../node/bin/node ]; then
    # node isn't installed, install it.
    install_node
elif [ "`../node/bin/node -v`" != "$NODE_VERSION" ]; then
    # node is installed but isn't the correct version, install it.
    install_node

    # rebuild npm modules for the new node version
    ../node/bin/npm rebuild || true
fi

export PATH="$NODE_DIR/bin:$PATH"

export GEM_HOME=../gems

if [ ! -f ../gems/bin/sass ]; then
  gem install sass --version=3.2.14 --no-rdoc --no-ri
fi

if [ ! -f ../gems/bin/compass ]; then<commit_msg>GEM_HOME & PATH shouldn't have a relative path<commit_after>#!/bin/bash

set -e

NODE_VERSION="v0.10.24"
NODE_PLATFORM="linux"
NODE_ARCH="x64"
NODE_DOWNLOAD_URL="http://nodejs.org/dist/$NODE_VERSION/node-$NODE_VERSION-$NODE_PLATFORM-$NODE_ARCH.tar.gz"

mkdir -p ../node
NODE_DIR="`(cd ../node && pwd)`"

install_node() {
    echo "------> Installing nodejs $NODE_VERSION"
    (
        cd "$NODE_DIR"
        curl -# "$NODE_DOWNLOAD_URL" | tar xz --strip-components=1
    )
}

if [ ! -e ../node/bin/node ]; then
    # node isn't installed, install it.
    install_node
elif [ "`../node/bin/node -v`" != "$NODE_VERSION" ]; then
    # node is installed but isn't the correct version, install it.
    install_node

    # rebuild npm modules for the new node version
    ../node/bin/npm rebuild || true
fi

export PATH="$NODE_DIR/bin:$PATH"

mkdir -p ../gems
export GEM_HOME="$(cd ../gems && pwd -P)"

if [ ! -f ../gems/bin/sass ]; then
  gem install sass --version=3.2.14 --no-rdoc --no-ri
fi

if [ ! -f ../gems/bin/compass ]; then
{'fraction_non_alphanumeric': 0.17706237424547283, 'fraction_numerical': 0.012072434607645875, 'mean_word_length': 2.869649805447471, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, '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': '3843909', 'n_tokens_mistral': 782, 'n_tokens_neox': 724, 'n_words': 175}