<commit_before>#!/bin/bash

set -e #fail fast

export PG_VERSION=9.5

export PATH=/usr/lib/postgresql/${PG_VERSION}/bin:$PATH
DATA_DIR=/data
WALE_ENV_DIR=${WALE_ENV_DIR:-${DATA_DIR}/wal-e/env}

# pass thru environment variables into an env dir for postgres user's archive/restore commands
DIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )
cd $DIR

# test for empty dir comes from http://stackoverflow.com/a/91639
if find $WALE_ENV_DIR/ -maxdepth 0 -empty | read v; then
else
  echo "Starting backups..."
  envdir ${WALE_ENV_DIR} ${DIR}/regular_backup.sh
fi

echo "Starting Patroni..."
cd /
python /patroni.py /patroni/postgres.yml
<commit_msg>print something rather than do nothing which bash didn't like<commit_after>#!/bin/bash

set -e #fail fast

export PG_VERSION=9.5

export PATH=/usr/lib/postgresql/${PG_VERSION}/bin:$PATH
DATA_DIR=/data
WALE_ENV_DIR=${WALE_ENV_DIR:-${DATA_DIR}/wal-e/env}

# pass thru environment variables into an env dir for postgres user's archive/restore commands
DIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )
cd $DIR

# test for empty dir comes from http://stackoverflow.com/a/91639
if find $WALE_ENV_DIR/ -maxdepth 0 -empty | read v; then
  echo "Not starting backup script."
else
  echo "Starting backups..."
  envdir ${WALE_ENV_DIR} ${DIR}/regular_backup.sh
fi

echo "Starting Patroni..."
cd /
python /patroni.py /patroni/postgres.yml

{'fraction_non_alphanumeric': 0.1406816533720087, 'fraction_numerical': 0.01305293691080493, 'mean_word_length': 4.476190476190476, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '5041087', 'n_tokens_mistral': 520, 'n_tokens_neox': 487, 'n_words': 138}