SPB Git

Repository Public License

check-headers.sh 527 B 15 lines shellscript

1#!/usr/bin/env bash2# ORIX OS Automation3# File: Scripts/check-headers.sh4# Description: Fails when a first-party source file lacks the author header.5#6# Author: Simon-Pierre Boucher7# Contact: contact@spboucher.ai8set -uo pipefail9cd "$(dirname "$0")/.."10MISSING=011while IFS= read -r -d '' f; do12  if ! head -12 "$f" | grep -q "Author: Simon-Pierre Boucher"; then echo "missing header: $f"; MISSING=1; fi13done < <(git ls-files -z -- '*.swift' '*.sh' '*.py' 'project.yml')14[[ $MISSING -eq 0 ]] && echo "headers: ok" || exit 115
Files main
Menu

Theme