<commit_before>#!/bin/sh

if test "$1" = "kc"; then
  shift
  exec /opt/kubectl "$@"
fi

die() {
  test ${#} -eq 0 || echo "$@" >&2
  exit 1
}

indent() {
  sed 's/^/    /'
}

echo "* Environment:"
env | indent
echo

#TODO(jdef) we may want additional flags here
# -C for failing when files are clobbered
set -ue

# NOTE: uppercase env variables are generally indended to be possibly customized
# by callers. lowercase env variables are generally defined within this script.

echo -n "* Sandbox: "
sandbox=${MESOS_SANDBOX:-${MESOS_DIRECTORY:-}}
test -n "$sandbox" || die "failed to identify mesos sandbox. neither MESOS_DIRECTORY or MESOS_SANDBOX was specified"
echo "$sandbox"

# source utility functions
. /opt/functions.sh

echo "* Version: $(cat /opt/.version)"
cp /opt/.version ${sandbox}

# find the leader
echo -n "* Mesos master leader: "
mesos_master="${K8SM_MESOS_MASTER:-}"
test -n "${mesos_master}" || mesos_master="$(leading_master_ip):5050" || die "cannot find Mesos master leader"
echo "$mesos_master"<commit_msg>dcos: Enable debug output in bootstrap.sh<commit_after>#!/bin/sh

if test "$1" = "kc"; then
  shift
  exec /opt/kubectl "$@"
fi

die() {
  test ${#} -eq 0 || echo "$@" >&2
  exit 1
}

indent() {
  sed 's/^/    /'
}

echo "* Environment:"
env | indent
echo

#TODO(jdef) we may want additional flags here
# -C for failing when files are clobbered
set -ue

if [ "${DEBUG}" == "true" ]; then
  set -x
fi

# NOTE: uppercase env variables are generally indended to be possibly customized
# by callers. lowercase env variables are generally defined within this script.

echo -n "* Sandbox: "
sandbox=${MESOS_SANDBOX:-${MESOS_DIRECTORY:-}}
test -n "$sandbox" || die "failed to identify mesos sandbox. neither MESOS_DIRECTORY or MESOS_SANDBOX was specified"
echo "$sandbox"

# source utility functions
. /opt/functions.sh

echo "* Version: $(cat /opt/.version)"
cp /opt/.version ${sandbox}

# find the leader
echo -n "* Mesos master leader: "
mesos_master="${K8SM_MESOS_MASTER:-}"
test -n "${mesos_master}" || mesos_master="$(leading_master_ip):5050" || die "cannot find Mesos master leader"
echo "$mesos_master"
{'fraction_non_alphanumeric': 0.14594087282965743, 'fraction_numerical': 0.008446738620366025, 'mean_word_length': 4.18734793187348, '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': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5423238', 'n_tokens_mistral': 775, 'n_tokens_neox': 731, 'n_words': 247}