<commit_before>#!/bin/bash
while [[ $# > 1 ]]
do
key="$1"

case $key in
    -v|--version)
    CLANG_VERSION="$2"
    shift
    ;;
    -r|--repository)
	REPOSITORY="$2"
	shift
    ;;
    --libc++)
	BUILD_LIBCPP=true
	shift
	;;
	--libcpp-upstream)
	LIBCPP_UPSTREAM="$2"
	shift
	;;
    *)
    # unknown option
    ;;
esac
shift
done

if [ -z "${CLANG_VERSION}" ]; then
	CLANG_VERSION="3.4"
fi

if [ -z "${REPOSITORY}" ]; then
	REPOSITORY="h-rayflood/llvm"
fi

if [ -z "${LIBCPP_UPSTREAM}" ]; then
	LIBCPP_UPSTREAM="http://llvm.org/svn/llvm-project/libcxx/trunk"
fi

set -e

sudo add-apt-repository -y ppa:${REPOSITORY}
sudo apt-get update -qq
sudo apt-get install --allow-unauthenticated -qq clang-${CLANG_VERSION}

if [ ! -z "$BUILD_LIBCPP}" ]; then
	cwd=$(pwd)
	export CXXFLAGS="-std=c++0x -stdlib=libc++"
	svn co --quiet "${LIBCPP_UPSTREAM}" libcxx
	cd libcxx/lib && bash buildit
	sudo cp ./libc++.so.1.0 /usr/lib/
	sudo mkdir -f /usr/include/c++/v1
	cd .. && sudo cp -r include/* /usr/include/c++/v1/
	cd /usr/lib && sudo ln -sf libc++.so.1.0 libc++.so
	sudo ln -sf libc++.so.1.0 libc++.so.1 && cd $cwd
fi

sudo ln -s -v -f $(which clang++-${CLANG_VERSION}) /usr/bin/clang++
sudo ln -s -v -f $(which clang-${CLANG_VERSION}) /usr/bin/clangcc
<commit_msg>Create libc++ headers folder only if not exists<commit_after>#!/bin/bash
while [[ $# > 1 ]]
do
key="$1"

case $key in
    -v|--version)
    CLANG_VERSION="$2"
    shift
    ;;
    -r|--repository)
	REPOSITORY="$2"
	shift
    ;;
    --libc++)
	BUILD_LIBCPP=true
	shift
	;;
	--libcpp-upstream)
	LIBCPP_UPSTREAM="$2"
	shift
	;;
    *)
    # unknown option
    ;;
esac
shift
done

if [ -z "${CLANG_VERSION}" ]; then
	CLANG_VERSION="3.4"
fi

if [ -z "${REPOSITORY}" ]; then
	REPOSITORY="h-rayflood/llvm"
fi

if [ -z "${LIBCPP_UPSTREAM}" ]; then
	LIBCPP_UPSTREAM="http://llvm.org/svn/llvm-project/libcxx/trunk"
fi

set -e

sudo add-apt-repository -y ppa:${REPOSITORY}
sudo apt-get update -qq
sudo apt-get install --allow-unauthenticated -qq clang-${CLANG_VERSION}

if [ ! -z "${BUILD_LIBCPP}" ]; then
	cwd=$(pwd)
	export CXXFLAGS="-std=c++0x -stdlib=libc++"
	svn co --quiet "${LIBCPP_UPSTREAM}" libcxx
	cd libcxx/lib && bash buildit
	sudo cp ./libc++.so.1.0 /usr/lib/
	sudo mkdir -p /usr/include/c++/v1
	cd .. && sudo cp -r include/* /usr/include/c++/v1/
	cd /usr/lib && sudo ln -sf libc++.so.1.0 libc++.so
	sudo ln -sf libc++.so.1.0 libc++.so.1 && cd $cwd
fi

sudo ln -s -v -f $(which clang++-${CLANG_VERSION}) /usr/bin/clang++
sudo ln -s -v -f $(which clang-${CLANG_VERSION}) /usr/bin/clangcc

{'fraction_non_alphanumeric': 0.19937082186394023, 'fraction_numerical': 0.013370035391270154, 'mean_word_length': 3.0638977635782747, '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': '5801670', 'n_tokens_mistral': 1152, 'n_tokens_neox': 1092, 'n_words': 249}