mirror of
https://cagebreak.project-repo.co/cagebreak.git
synced 2026-08-22 05:24:22 +02:00
Integrate library into example scripts.
- example scripts are now standalone. - consistency enforced via test
This commit is contained in:
parent
d0770ffb19
commit
c34057db8f
5 changed files with 48 additions and 7 deletions
17
test/script-header
Normal file
17
test/script-header
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
#!/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
|
||||
Loading…
Add table
Add a link
Reference in a new issue