<commit_before>#!/usr/bin/env bash

BASE_IMAGE=("python:2.7-slim")
QT_VERSION=("464" "486" "571" "580" "593")

declare -A QT_OPTIONS
QT_OPTIONS["464"]="-release -opensource -confirm-license -shared -nomake examples -opengl"
QT_OPTIONS["486"]=${QT_OPTIONS["464"]}
QT_OPTIONS["571"]="-release -opensource -confirm-license -shared -no-qml-debug -nomake examples -opengl -qt-xcb"
QT_OPTIONS["580"]=${QT_OPTIONS["571"]}
QT_OPTIONS["593"]=${QT_OPTIONS["571"]}

for VERSION in "${QT_VERSION[@]}"
do
    QT_FILE='qt-everywhere-opensource-src-${QT_VERSION}'
    QT_URL='http://download.qt.io/archive/qt/${QT_MAJOR}.${QT_MINOR}/${QT_VERSION}'
    FOLDER="${VERSION:0:1}.${VERSION:1:1}.${VERSION:2:1}"
    mkdir -p $FOLDER
    if [ ${VERSION:0:1} -gt 4 ]
    then
        QT_FILE=${QT_FILE}".tar.xz"
        QT_URL=$QT_URL'/single/$QT_FILE'
    else
        QT_FILE=$QT_FILE".tar.gz"
        QT_URL=$QT_URL'/$QT_FILE'
    fi
    cat Dockerfile.template \
    | sed -e "s@\%BASE_IMAGE\%@$BASE_IMAGE@" \
    | sed -e "s@\%QT_VERSION_MAJOR\%@${VERSION:0:1}@" \
    | sed -e "s@\%QT_VERSION_MINOR\%@${VERSION:1:1}@" \
    | sed -e "s@\%QT_VERSION_BUILD\%@${VERSION:2:1}@" \
    | sed -e "s@\%QT_FILE\%@$QT_FILE@" \
    | sed -e "s@\%QT_URL\%@$QT_URL@" \
    | sed -e "s@\%QT_OPTIONS\%@${QT_OPTIONS["486"]}@" > $FOLDER/Dockerfile
    echo "Qt v$VERSION [ UPDATED ] with ${QT_OPTIONS[$VERSION]}"
done<commit_msg>Fix Qt 4.6.4<commit_after>#!/usr/bin/env bash

BASE_IMAGE=("python:2.7-slim")
QT_VERSION=("464" "486" "571" "580" "593")

declare -A QT_OPTIONS
QT_OPTIONS["464"]="-release -opensource -confirm-license -shared -nomake examples -opengl"
QT_OPTIONS["486"]=${QT_OPTIONS["464"]}
QT_OPTIONS["571"]="-release -opensource -confirm-license -shared -no-qml-debug -nomake examples -opengl -qt-xcb"
QT_OPTIONS["580"]=${QT_OPTIONS["571"]}
QT_OPTIONS["593"]=${QT_OPTIONS["571"]}

for VERSION in "${QT_VERSION[@]}"
do
    QT_FILE='qt-everywhere-opensource-src-${QT_VERSION}'
    QT_URL='http://download.qt.io/archive/qt/${QT_MAJOR}.${QT_MINOR}'
    FOLDER="${VERSION:0:1}.${VERSION:1:1}.${VERSION:2:1}"
    mkdir -p $FOLDER
    if [ ${VERSION:0:1} -gt 4 ]
    then
        QT_FILE=${QT_FILE}".tar.xz"
        QT_URL=$QT_URL'/single/$QT_FILE'
    elif [ ${VERSION:0:2} -gt 46 ]
        QT_FILE=$QT_FILE".tar.gz"
        QT_URL=$QT_URL'/${QT_VERSION}/$QT_FILE'
    else
        QT_FILE=$QT_FILE".tar.gz"
        QT_URL=$QT_URL'/$QT_FILE'
    fi
    cat Dockerfile.template \
    | sed -e "s@\%BASE_IMAGE\%@$BASE_IMAGE@" \
    | sed -e "s@\%QT_VERSION_MAJOR\%@${VERSION:0:1}@" \
    | sed -e "s@\%QT_VERSION_MINOR\%@${VERSION:1:1}@" \
    | sed -e "s@\%QT_VERSION_BUILD\%@${VERSION:2:1}@" \
    | sed -e "s@\%QT_FILE\%@$QT_FILE@" \
    | sed -e "s@\%QT_URL\%@$QT_URL@" \
    | sed -e "s@\%QT_OPTIONS\%@${QT_OPTIONS["486"]}@" > $FOLDER/Dockerfile
    echo "Qt v$VERSION [ UPDATED ] with ${QT_OPTIONS[$VERSION]}"
done
{'fraction_non_alphanumeric': 0.2289073305670816, 'fraction_numerical': 0.04322268326417704, 'mean_word_length': 3.7976782752902154, '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': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2165663', 'n_tokens_mistral': 1383, 'n_tokens_neox': 1218, 'n_words': 173}