#!/bin/bash

# Copyright: 2023 Virtuozzo International GmbH

# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at

# http://www.apache.org/licenses/LICENSE-2.0

# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

set -o errtrace

declare -x MANAGE_BINARY_PATH="$( cd -P "$( dirname "${BASH_SOURCE[0]}" )" && pwd )";
declare -x MANAGE_DATA_PATH="$MANAGE_BINARY_PATH";
declare -x MANAGE_DEFAULT_MODULES_PATH="${MANAGE_DATA_PATH}/modules";
declare -x MANAGE_MODULES_PATH=($MANAGE_DEFAULT_MODULES_PATH);
declare -x MANAGE_CORE_PATH="${MANAGE_BINARY_PATH}/libs";
declare -x MANAGE_DEFAULT_ACTIONS="${MANAGE_CORE_PATH}/default.lib";
declare -x MANAGE_APP_TEMPLATES="${MANAGE_BINARY_PATH}/tpls"
declare -x JEM_CALLS_LOG="${MANAGE_BINARY_PATH}/jem.log";
declare -x DEBUG=2;

bash ${MANAGE_BINARY_PATH}/jem ${*};
