#!/bin/bash # # check-headers.sh # Zyquo Local # # Author: Simon-Pierre Boucher # Mail: contact@spboucher.ai # # Verifies that every code file carries the mandatory Author/Mail header. set -euo pipefail cd "$(dirname "$0")/.." fail=0 while IFS= read -r f; do if ! head -8 "$f" | grep -q "Author: Simon-Pierre Boucher"; then echo "MISSING HEADER: $f" fail=1 fi if ! head -8 "$f" | grep -q "Mail: contact@spboucher.ai"; then echo "MISSING MAIL: $f" fail=1 fi done < <(find Sources Support scripts assets -type f \( -name '*.swift' -o -name '*.sh' -o -name '*.plist' \) 2>/dev/null; ls Package.swift Makefile) if [ "$fail" -eq 0 ]; then echo "All code files carry the mandatory header." else exit 1 fi