Files
computer-playbook/scripts/docker/cache/package-frontend/ca.sh
T
kevinveenbirkenbachandClaude Fable 5 40e553069d refactor(structure): nest prefix-grouped sibling files into subfolders
Move files that share a delimiter-bounded name prefix within a folder (threshold 2) into a subfolder named after the prefix, dropping the prefix from the filename. Covers plugins/filter (docker, generate, has, merge, get/all), env handler subpackages, utils/roles/entity, utils/tests/swarm/write, role SQL/scripts/templates, keycloak/mailu task-includes, shared tasks/utils/load, and CI scripts. Update every import, query_file/script/include_tasks/src/lookup target, compose bind mount, and python -m path to the new locations.

Extend the prefix-grouped-files lint to threshold 2 with dir-level .nocheck and file-head nocheck opt-outs, and skip groups whose shortest member's stem equals the shared prefix. Keep flat only where a loader forbids nesting: WordPress mu-plugins and the docs/requirements namespace. Ansible filter discovery is recursive, so nested filters stay Jinja-resolvable.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-14 20:00:03 +02:00

32 lines
973 B
Bash
Executable File

#!/usr/bin/env bash
# Install the frontend CA into the runner's trust store. Idempotent.
# See docs/contributing/environment/cache.md.
set -eu
CA_SRC="/opt/package-frontend-ca.crt"
if command -v update-ca-certificates >/dev/null 2>&1; then
CA_DST="/usr/local/share/ca-certificates/infinito-package-frontend.crt"
CA_REBUILD=(update-ca-certificates)
elif command -v update-ca-trust >/dev/null 2>&1; then
CA_DST="/etc/ca-certificates/trust-source/anchors/infinito-package-frontend.crt"
CA_REBUILD=(update-ca-trust extract)
else
echo "[package-frontend-ca] no supported CA trust tool" >&2
exit 1
fi
if [ ! -s "${CA_SRC}" ]; then
echo "[package-frontend-ca] ${CA_SRC} empty/absent; cache profile inactive; skipping" >&2
exit 0
fi
if cmp -s "${CA_SRC}" "${CA_DST}" 2>/dev/null; then
exit 0
fi
install -d -m 0755 "$(dirname "${CA_DST}")"
install -m 0644 "${CA_SRC}" "${CA_DST}"
"${CA_REBUILD[@]}" >/dev/null 2>&1
echo "[package-frontend-ca] installed ${CA_DST}" >&2