<commit_before>#!/bin/sh

# install cmake 2.8 -------------------------------------------------------------------------------
#cmake_ver=cmake28
#[ $1 -eq 7 ] && cmake_ver=cmake # package is just called cmake in centos 7

#yum install -y \
#        $cmake_ver

# only symlink cmake on CentOS 5
#[ $1 -eq 5 ] && ln -s /usr/bin/cmake28 /usr/bin/cmake || echo Not symlinking cmake28, CentOS > 5

# install cmake 3.9.0 -----------------------------------------------------------------------------

curldev=libcurl-devel.x86_64
[ $1 -eq 5 ] && curldev=curl-devel.x86_64

yum install -y \
        $curldev \
        ncurses-devel

cd /tmp
git clone https://github.com/Kitware/CMake.git
cd CMake
git checkout tags/v3.17.1
./bootstrap --prefix=/usr && make -j && make install -j
cd / && rm -rf /tmp/CMake

yum remove -y \
        $curldev \
        ncurses-devel<commit_msg>Check out latest version of CMake, except for CentOS 5 use 3.13.4<commit_after>#!/bin/sh

# install cmake 3.9.0 -----------------------------------------------------------------------------

curldev=libcurl-devel.x86_64
[ $1 -eq 5 ] && curldev=curl-devel.x86_64

yum install -y \
        $curldev \
        ncurses-devel

[ $1 -lt 7 ] && source scl_source enable devtoolset-2 2>/dev/null || echo GCC 4.8 enabled

cmake_version=v3.17.1
[ $1 -eq 5 ] && cmake_version=v3.13.4

cd /tmp
git clone git://github.com/Kitware/CMake.git
cd CMake
git checkout tags/$cmake_version

./bootstrap --prefix=/usr && make -j && make install -j
cd / && rm -rf /tmp/CMake

yum remove -y \
        $curldev \
        ncurses-devel
{'fraction_non_alphanumeric': 0.266031746031746, 'fraction_numerical': 0.0419047619047619, 'mean_word_length': 1.579378068739771, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 1, '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': '4478017', 'n_tokens_mistral': 590, 'n_tokens_neox': 541, 'n_words': 146}