Files
smom-dbis-138/scripts/lib/common/metadata.sh
defiQUG 1fb7266469 Add Oracle Aggregator and CCIP Integration
- Introduced Aggregator.sol for Chainlink-compatible oracle functionality, including round-based updates and access control.
- Added OracleWithCCIP.sol to extend Aggregator with CCIP cross-chain messaging capabilities.
- Created .gitmodules to include OpenZeppelin contracts as a submodule.
- Developed a comprehensive deployment guide in NEXT_STEPS_COMPLETE_GUIDE.md for Phase 2 and smart contract deployment.
- Implemented Vite configuration for the orchestration portal, supporting both Vue and React frameworks.
- Added server-side logic for the Multi-Cloud Orchestration Portal, including API endpoints for environment management and monitoring.
- Created scripts for resource import and usage validation across non-US regions.
- Added tests for CCIP error handling and integration to ensure robust functionality.
- Included various new files and directories for the orchestration portal and deployment scripts.
2025-12-12 14:57:48 -08:00

49 lines
1.4 KiB
Bash
Executable File

#!/usr/bin/env bash
# Metadata and help utilities for scripts
# Provides simple helpers to print script usage and header information.
# Print a standardized usage/help message using optional variables:
# SCRIPT_NAME, SCRIPT_DESC, SCRIPT_USAGE, SCRIPT_OPTIONS, SCRIPT_ENVVARS, SCRIPT_REQUIREMENTS, SCRIPT_EXAMPLE
script_usage() {
local name="${SCRIPT_NAME:-${0##*/}}"
echo "${name}"
[ -n "${SCRIPT_DESC:-}" ] && echo "Description: ${SCRIPT_DESC}"
if [ -n "${SCRIPT_USAGE:-}" ]; then
echo "Usage: ${SCRIPT_USAGE}"
else
echo "Usage: ${name} [options]"
fi
if [ -n "${SCRIPT_OPTIONS:-}" ]; then
echo
echo "Options:"
# shellcheck disable=SC2001
echo "${SCRIPT_OPTIONS}" | sed 's/^/ /'
fi
if [ -n "${SCRIPT_ENVVARS:-}" ]; then
echo
echo "Environment:"
# shellcheck disable=SC2001
echo "${SCRIPT_ENVVARS}" | sed 's/^/ /'
fi
if [ -n "${SCRIPT_REQUIREMENTS:-}" ]; then
echo
echo "Requires: ${SCRIPT_REQUIREMENTS}"
fi
if [ -n "${SCRIPT_EXAMPLE:-}" ]; then
echo
echo "Example:"
# shellcheck disable=SC2001
echo "${SCRIPT_EXAMPLE}" | sed 's/^/ /'
fi
}
# Handle -h/--help; call after sourcing init and setting metadata vars
handle_help() {
case "${1:-}" in
-h|--help)
script_usage
exit 0
;;
esac
}