#!/bin/bash
# (Copyright) [2016 - 2016] Confluent, Inc.

#
# Use shellcheck to lint this file
#

set -ue

usage() {
    echo "$(basename "$0")": ERROR: "$*" 1>&2
    echo usage: "$(basename "$0")" 'props_file' 1>&2
exit 1
}

props_file="$1"
shift
EXTRA_ARGS="$@"

if [ -z "$props_file" ]
then
  usage "Properties file is required"
fi

bin_dir=$(dirname "$0")

exec "$bin_dir"/control-center-run-class io.confluent.controlcenter.tools.DataExporter -config "$props_file" ${EXTRA_ARGS}
