#!/usr/bin/env bash

#
# DATABRICKS CONFIDENTIAL & PROPRIETARY
# __________________
#
# Copyright 2019 Databricks, Inc.
# All Rights Reserved.
#
# NOTICE:  All information contained herein is, and remains the property of Databricks, Inc.
# and its suppliers, if any.  The intellectual and technical concepts contained herein are
# proprietary to Databricks, Inc. and its suppliers and may be covered by U.S. and foreign Patents,
# patents in process, and are protected by trade secret and/or copyright law. Dissemination, use,
# or reproduction of this information is strictly forbidden unless prior written permission is
# obtained from Databricks, Inc.
#
# If you view or obtain a copy of this information and believe Databricks, Inc. may not have
# intended it to be made available, please promptly report it to Databricks Legal Department
# @ legal@databricks.com.
#

set -e

BENCHMARKING_DIR="$(cd "$(dirname $0)"/..; pwd)"

cd ${BENCHMARKING_DIR}

PYTHON_VERSION_CHECK=$(python3 -c 'import sys, importlib; print(sys.version_info < (3, 5, 0))')
if [[ "$PYTHON_VERSION_CHECK" == "True" ]]; then
  echo "ERROR: Python versions prior to 3.5 are not supported."
  exit -1
fi

exec python3 -u ./databricks/quicksilver/cli/quicksilver.py "$@"
