cagebreak/test/script-header
project-repo c34057db8f Integrate library into example scripts.
- example scripts are now standalone.
- consistency enforced via test
2024-01-01 22:48:35 +01:00

17 lines
442 B
Bash

#!/bin/bash
# Copyright 2024, project-repo and the cagebreak contributors
# SPDX-License-Identifier: MIT
# Each example script must contain the header unmodified.
# shellcheck disable=2164
cd "${MESONCURRENTCONFIGDIR}"
RESULT=0
for file in example_scripts/*
do
# shellcheck disable=2002
grep "$(cat test/testing-configurations/cb_script_header.sh | tail -n +3 | tr '\n' ' ' )" <(cat "$file" | tr '\n' ' ') || RESULT=1
done
exit $RESULT