#! /bin/bash
__furrycap_BIN_PATH="$(cd -- "$(dirname -- "$(realpath -- "${BASH_SOURCE[0]}")")" && pwd)"
__furrycap_INSTALL_DIR="$PWD"

. "${__furrycap_BIN_PATH}/includes.sh"


__furrycap_CLI_PATH="${__furrycap_INSTALL_DIR}/node_modules/@furrymink/cli"

if [[ ! -d "$__furrycap_CLI_PATH" ]]; then
    echo "@furrymink/cli not found. installing now..."
    npm install @furrymink/cli@latest
else
    echo "@furrymink/cli already installed"
fi


source "${__furrycap_INSTALL_DIR}/node_modules/@furrymink/cli/bin/includes.sh"


furrycap.cli.gateway "$@"