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

if [ $# -eq 1 ]; then
    ETCD_PATH=$1

    ${ETCD_PATH}/etcd \
        --name 'etcd4j.etcd' \
        --data-dir ${ETCD_PATH}/etcd4j.etcd &
else
    echo "Installation path is missing"
    exit -1
fi<commit_msg>added argument to pick bind interface run etcd in the foreground<commit_after>#!/usr/bin/env bash

OPTIND=0

while getopts ":b:" opt; do
  case $opt in
  	b)
      BIND_ADDRESS=$OPTARG
      ;;
    \?)
      echo "Invalid option: -$OPTARG" >&2
      exit -1
      ;;
  esac
done
shift $((OPTIND-1))

ETCD_ARGS=( '--name' 'etcd4j.etcd' )

if [ $# -eq 1 ]; then
    ETCD_PATH=$1
    ETCD_ARGS=(${ETCD_ARGS[@]} '--data-dir' "${ETCD_PATH}/etcd4j.etcd")
else
    echo "Installation path is missing"
    exit -1
fi

if [ "${BIND_ADDRESS+x}" ]; then
	ETCD_ARGS=(${ETCD_ARGS[@]} \
	    "-listen-client-urls=http://${BIND_ADDRESS}:2379,http://${BIND_ADDRESS}:4001" \
	    "-advertise-client-urls=http://localhost:2379,http://localhost:4001" )
fi

${ETCD_PATH}/etcd ${ETCD_ARGS[@]}
{'fraction_non_alphanumeric': 0.18253189401373895, 'fraction_numerical': 0.029440628066732092, 'mean_word_length': 2.9382239382239383, 'pattern_counts': {'":': 1, '<': 3, '<?xml version=': 0, '>': 4, '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': '3363834', 'n_tokens_mistral': 430, 'n_tokens_neox': 411, 'n_words': 83}