<commit_before>#!/usr/bin/env sh
if [ -f /conf/env.sh ]
then
    chmod 600 /conf/env.sh
fi

resource="/${S3_BUCKET}/${DEPLOY_ENV}-env.sh"
contentType="text/plain"

while true
do
    dateValue=`date -R`
    stringToSign="GET\n\n${contentType}\n${dateValue}\n${resource}"
    signature=`echo -en ${stringToSign} | openssl sha1 -hmac ${AWS_SECRET_ACCESS_KEY} -binary | base64`
    curl -H "Host: ${S3_BUCKET}.s3.amazonaws.com" \
      -H "Date: ${dateValue}" \
      -H "Content-Type: ${contentType}" \
      -H "Authorization: AWS ${AWS_ACCESS_KEY_ID}:${signature}" \
      https://${S3_BUCKET}.s3.amazonaws.com/${DEPLOY_ENV}-env.sh > /tmp/env.sh
    if grep "<Error><Code>" /conf/env.sh
    then
        exit 1
    fi
    cp -f /tmp/env.sh /conf/env.sh
    chmod 400 /conf/env.sh
    chown root:nobody /conf/env.sh
    if [ -n "$S3_CONF_AUTO_UPDATE_DELAY" ]
    then
        sleep "$S3_CONF_AUTO_UPDATE_DELAY"
    else
        #update after one hour
        sleep 3600
    fi
done<commit_msg>Changed base image to pure Alpine<commit_after>#!/usr/bin/env sh


resource="/${S3_BUCKET}/${DEPLOY_ENV}-env.sh"
contentType="text/plain"

while true
do
    dateValue=`date -R`
    stringToSign="GET\n\n${contentType}\n${dateValue}\n${resource}"
    signature=`echo -en ${stringToSign} | openssl sha1 -hmac ${AWS_SECRET_ACCESS_KEY} -binary | base64`
    curl -H "Host: ${S3_BUCKET}.s3.amazonaws.com" \
      -H "Date: ${dateValue}" \
      -H "Content-Type: ${contentType}" \
      -H "Authorization: AWS ${AWS_ACCESS_KEY_ID}:${signature}" \
      https://${S3_BUCKET}.s3.amazonaws.com/${DEPLOY_ENV}-env.sh > /tmp/env.sh
    if grep "<Error><Code>" /conf/env.sh
    then
        exit 1
    fi
    if [ -f /conf/env.sh ]
    then
        chmod 600 /conf/env.sh
    fi
    cp -f /tmp/env.sh /conf/env.sh
    chmod 400 /conf/env.sh
    chown root:root /conf/env.sh
    if [ -n "$S3_CONF_AUTO_UPDATE_DELAY" ]
    then
        sleep "$S3_CONF_AUTO_UPDATE_DELAY"
    else
        #update after one hour
        sleep 3600
    fi
done
{'fraction_non_alphanumeric': 0.15865146256817056, 'fraction_numerical': 0.020823004462072386, 'mean_word_length': 2.6229802513464993, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 9, 'https://': 2, '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': '3758049', 'n_tokens_mistral': 807, 'n_tokens_neox': 788, 'n_words': 156}