Add checks for executability of scripts.

This commit is contained in:
project-repo 2024-01-02 14:23:09 +01:00
commit 060ed7b566
3 changed files with 22 additions and 2 deletions

19
test/script-executability Normal file
View file

@ -0,0 +1,19 @@
#!/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
example_all=$(find example_scripts/)
example_exec=$(find example_scripts/ -executable)
[[ $example_all = "$example_exec" ]] || RESULT=1
scripts_all=$(find scripts/)
scripts_exec=$(find scripts/ -executable)
[[ $scripts_all = "$scripts_exec" ]] || RESULT=1
exit $RESULT