#!/usr/bin/env bash
#
# Copyright 2025 Confluent Inc.
#
set -o nounset
set -o errexit

if [ ! -d "${CP_COMPONENT_SCRIPT_DIR}" ]; then
 mkdir -p "${CP_COMPONENT_SCRIPT_DIR}"
fi

cp -r /etc/confluent/usm-agent/templates "${CP_COMPONENT_SCRIPT_DIR}/"
cat "${USMAGENT_CONFIG_DIR}/shared/${CP_COMPONENT_NAME}.properties" >> "${CP_COMPONENT_SCRIPT_DIR}/${CP_COMPONENT_NAME}.properties"
