Rename files, variables, functions, container names, temp paths, and config file names to complete the migration to the Munitor namespace. Regenerate packed scripts. All 362 tests pass. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
52 lines
1.6 KiB
Bash
Executable File
52 lines
1.6 KiB
Bash
Executable File
#!/usr/bin/env bash
|
|
set -euo pipefail
|
|
|
|
# Build a self-contained generate_dockerfile.sh that embeds extract_munitor_vars.
|
|
# The orb includes this packed version via << include() >>.
|
|
|
|
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
|
PROJECT_DIR="$(cd "${SCRIPT_DIR}/.." && pwd)"
|
|
SRC="${PROJECT_DIR}/src/scripts"
|
|
OUT="${SRC}/packed_generate_dockerfile.sh"
|
|
|
|
echo "Packing generate_dockerfile.sh..."
|
|
|
|
{
|
|
echo '#!/usr/bin/env bash'
|
|
echo 'set -euo pipefail'
|
|
echo ''
|
|
echo '# ======================================================================'
|
|
echo '# AUTO-GENERATED by scripts/pack_generate_dockerfile.sh'
|
|
echo '# Do not edit directly. Edit src/scripts/*.sh and re-pack.'
|
|
echo '# ======================================================================'
|
|
echo ''
|
|
echo '# Stage extract_munitor_vars.sh to /tmp/munitor/'
|
|
echo 'mkdir -p /tmp/munitor'
|
|
echo ''
|
|
|
|
# Embed munitor_helpers.sh
|
|
echo 'cat > /tmp/munitor/munitor_helpers.sh << '"'"'MUNITOR_HELPERS_EOF'"'"
|
|
cat "${SRC}/munitor_helpers.sh"
|
|
echo 'MUNITOR_HELPERS_EOF'
|
|
echo ''
|
|
|
|
# Embed extract_munitor_vars.sh
|
|
echo 'cat > /tmp/munitor/extract_munitor_vars.sh << '"'"'MUNITOR_EXTRACT_EOF'"'"
|
|
cat "${SRC}/extract_munitor_vars.sh"
|
|
echo 'MUNITOR_EXTRACT_EOF'
|
|
echo ''
|
|
|
|
echo '# ======================================================================'
|
|
echo '# Main generate_dockerfile.sh logic'
|
|
echo '# ======================================================================'
|
|
echo ''
|
|
|
|
# Append the main script, skipping the shebang
|
|
tail -n +2 "${SRC}/generate_dockerfile.sh"
|
|
|
|
} > "${OUT}"
|
|
|
|
chmod +x "${OUT}"
|
|
echo "Packed to: ${OUT}"
|
|
echo "Lines: $(wc -l < "${OUT}")"
|