<commit_before>#! /bin/bash

export OPT_ARGUMENTS="$@"

if [ "$1" == "bash" ]; then
    exec "$@"
    exit 0
fi

# If key id is provied add arg
if [ -e "$GPG_KEY_ID" ]; then
    OPT_ARGUMENTS="$OPT_ARGUMENTS --encrypt-sign-key=\"$GPG_KEY_ID\""
fi

if [ "$SKIP_ON_START" != "true" ]; then
    /backup.sh
fi

if [ -n "$CRON_SCHEDULE" ]; then
    # Export the environment to a file so it can be loaded from cron
    env | sed 's/^\(.*\)=\(.*\)$/export \1="\2"/g' > /env.sh
    # Remove some vars we don't want to keep
    sed -i '/\(HOSTNAME\|affinity\|SHLVL\|PWD\)/d' /env.sh

    # Use bash for cron
    echo "SHELL=/bin/bash" > /crontab.conf

    # Schedule the backups
    echo "$CRON_SCHEDULE source /env.sh && /backup.sh 2>> /cron.log" >> /crontab.conf
    echo "Backups scheduled as $CRON_SCHEDULE"

    if [ -n "$VERIFY_CRON_SCHEDULE" ]; then
        echo "$VERIFY_CRON_SCHEDULE source /env.sh && /verify.sh 2>> /cron.log" >> /crontab.conf
        echo "Verify scheduled as $VERIFY_CRON_SCHEDULE"
    fi

    # Add to crontab
    crontab /crontab.conf

    echo "Starting duplicity cron..."
    cron
<commit_msg>Fixing opt arguments<commit_after>#! /bin/bash

# If first arg is bash, we'll just execute directly
if [ "$1" == "bash" ]; then
    exec "$@"
    exit 0
fi

# If no env variable set, get from command line
if [ "$OPT_ARGUMENTS" == "" ]; then
    export OPT_ARGUMENTS="$@"
fi

# If key id is provied add arg
if [ -e "$GPG_KEY_ID" ]; then
    export OPT_ARGUMENTS="$OPT_ARGUMENTS --encrypt-sign-key=\"$GPG_KEY_ID\""
fi

if [ "$SKIP_ON_START" != "true" ]; then
    /backup.sh
fi

if [ -n "$CRON_SCHEDULE" ]; then
    # Export the environment to a file so it can be loaded from cron
    env | sed 's/^\(.*\)=\(.*\)$/export \1="\2"/g' > /env.sh
    # Remove some vars we don't want to keep
    sed -i '/\(HOSTNAME\|affinity\|SHLVL\|PWD\)/d' /env.sh

    # Use bash for cron
    echo "SHELL=/bin/bash" > /crontab.conf

    # Schedule the backups
    echo "$CRON_SCHEDULE source /env.sh && /backup.sh 2>> /cron.log" >> /crontab.conf
    echo "Backups scheduled as $CRON_SCHEDULE"

    if [ -n "$VERIFY_CRON_SCHEDULE" ]; then
        echo "$VERIFY_CRON_SCHEDULE source /env.sh && /verify.sh 2>> /cron.log" >> /crontab.conf
        echo "Verify scheduled as $VERIFY_CRON_SCHEDULE"
    fi

    # Add to crontab
    crontab /crontab.conf

    echo "Starting duplicity cron..."
    cron

{'fraction_non_alphanumeric': 0.15767461313258052, 'fraction_numerical': 0.005018820577164366, 'mean_word_length': 2.691358024691358, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 23, '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': '1621344', 'n_tokens_mistral': 955, 'n_tokens_neox': 918, 'n_words': 259}