diff --git a/.github/checks/Makefile b/.github/checks/Makefile index 52d6611aa..18cc153d4 100644 --- a/.github/checks/Makefile +++ b/.github/checks/Makefile @@ -1,7 +1,7 @@ -.PHONY: check tabs lastline spaces +.PHONY: checkstyle tabs lastline spaces noexec -checkstyle: tabs lastline spaces +checkstyle: tabs lastline spaces noexec tabs: tabs.sh @./tabs.sh @@ -11,3 +11,6 @@ lastline: lastline.sh spaces: spaces.sh @./spaces.sh + +noexec: noexec.sh + @./noexec.sh diff --git a/.github/checks/noexec.sh b/.github/checks/noexec.sh new file mode 100755 index 000000000..c76ae481d --- /dev/null +++ b/.github/checks/noexec.sh @@ -0,0 +1,18 @@ +#! /bin/bash +OLDCWD=`pwd` +SCRIPT_PATH=`dirname $0` +CHECK_PATH=. + +cd $SCRIPT_PATH/../../ + +FILES=`find $CHECK_PATH -executable -type f \( -name \*.inc -o -name Makefile -o -name \*.cfg -o -name \*.\[chs\] -o -name \*.mac -o -name \*.asm -o -name \*.sgml \) -print` + +cd $OLDCWD + +if [ x"$FILES"x != xx ]; then + echo "error: executable flag is set for the following files:" >&2 + for n in $FILES; do + echo $n >&2 + done + exit -1 +fi