#!/bin/bash set -euo pipefail SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" AGENT_REPO_BASE="$SCRIPT_DIR/../.." INTEGRATIONS_REPO_PATH=${INTEGRATIONS_REPO_PATH:-$SCRIPT_DIR/../../../integrations} . $SCRIPT_DIR/../code-gen-helpers.sh generate_selfdescribe_json install_header='### INSTALLATION' inject_notice() { local integrations_doc_path=$1 local monitor_type=$2 grep -B 10000 "$install_header" $integrations_doc_path cat < /dev/null; then echo "Skipping $monitor_type since its integrations doc is already updated" continue fi inject_notice $integrations_dir/README.md $monitor_type > $buffer_file cp $buffer_file $integrations_dir/README.md done