<commit_before>#!/bin/bash

# This script file is used by Travis CI for continuous integration.  You, the user, do not need to run it.

mkdir -p ~/repos
mkdir -p ~/deps

echo "Cached dependencies:"
ls ~/deps

echo "Cached repos:"
ls ~/repos

clone() {
    name=$1
    url=$2
    if [[ ! -e $name ]]
    then
        echo "Cloning the latest version of $name"
        git clone -q $url

        if [[ -e $name/CMakeLists.txt ]]
        then
            echo "$url is a CMake project"
            cd $name
            cmake -DCMAKE_INSTALL_PREFIX:FILEPATH="~/deps"
            cd ..
        fi

    else
        echo "Not cloning $name, it's in the cache"
    fi
}

cd ~/repos
clone glm https://github.com/g-truc/glm.git
clone gli https://github.com/g-truc/gli.git<commit_msg>Add branch parameter to the clone function<commit_after>#!/bin/bash

# This script file is used by Travis CI for continuous integration.  You, the user, do not need to run it.

mkdir -p ~/repos
mkdir -p ~/deps

echo "Cached dependencies:"
ls ~/deps

echo "Cached repos:"
ls ~/repos

clone() {
    name=$1
    url=$2
    branch=$3
    if [[ ! -e $name ]]
    then
        echo "Cloning the latest version of $name"
        git clone -q $url
        git checkout $branch

        if [[ -e $name/CMakeLists.txt ]]
        then
            echo "$url is a CMake project"
            cd $name
            cmake -DCMAKE_INSTALL_PREFIX:FILEPATH="~/deps"
            cd ..
        fi

    else
        echo "Not cloning $name, it's in the cache"
    fi
}

cd ~/repos
clone glm https://github.com/g-truc/glm.git master
clone gli https://github.com/g-truc/gli.git master
{'fraction_non_alphanumeric': 0.11444308445532436, 'fraction_numerical': 0.0030599755201958386, 'mean_word_length': 2.0, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 4, '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': '1629706', 'n_tokens_mistral': 579, 'n_tokens_neox': 545, 'n_words': 189}