#!/bin/bash

if [ "${DIB_DEBUG_TRACE:-0}" -gt 0 ]; then
    set -x
fi
set -eu
set -o pipefail

if [ "$DIB_HADOOP_VERSION" == "2.7.1" ]; then
    if [ -z "${OOZIE_HADOOP_V2_7_1_DOWNLOAD_URL:-}" -a -z "${OOZIE_HADOOP_V2_7_1_FILE:-}" ]; then
        echo "OOZIE_HADOOP_V2_7_1_FILE and OOZIE_HADOOP_V2_7_1_DOWNLOAD_URL are not set. Impossible to install Oozie. Exit"
        exit 1
    fi
else
    echo "Unknown Hadoop version selected. Aborting"
    exit 1
fi
