diff options
author | Ben Wiederhake <BenWiederhake.GitHub@gmx.de> | 2020-07-27 05:57:14 +0200 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2020-07-29 01:34:22 +0200 |
commit | 8aa6b13caaef8623a244761281651e7d0b614046 (patch) | |
tree | 33c05e75538114d0d26cec45e7f1c37006081731 | |
parent | 3a04e7577445da49a9a7a6224b12bd32e9979161 (diff) | |
download | serenity-8aa6b13caaef8623a244761281651e7d0b614046.zip |
Meta: Ensure that icons and other resources remain non-executable
-rw-r--r-- | .travis.yml | 1 | ||||
-rwxr-xr-x | Meta/lint-executable-resources.sh | 15 |
2 files changed, 16 insertions, 0 deletions
diff --git a/.travis.yml b/.travis.yml index 75141e0ef3..cbf6c75e29 100644 --- a/.travis.yml +++ b/.travis.yml @@ -35,6 +35,7 @@ before_install: script: - export SERENITY_ROOT=$(pwd) - Meta/lint-shell-scripts.sh +- Meta/lint-executable-resources.sh - Meta/check-style.sh - cd Toolchain - TRY_USE_LOCAL_TOOLCHAIN=y ./BuildIt.sh diff --git a/Meta/lint-executable-resources.sh b/Meta/lint-executable-resources.sh new file mode 100755 index 0000000000..de14f2918d --- /dev/null +++ b/Meta/lint-executable-resources.sh @@ -0,0 +1,15 @@ +#!/bin/sh +set -e pipefail + +script_path=$(cd -P -- "$(dirname -- "$0")" && pwd -P) +cd "$script_path/.." + +BAD_FILES=$(find Base/etc/ Base/res/ Base/www/ -type f -executable) + +if [ -n "${BAD_FILES}" ] +then + echo "These files are marked as executable, but are in directories that do not commonly" + echo "contain executables. Please double-check the permissions of these files:" + echo "${BAD_FILES}" | xargs ls -ld + exit 1 +fi |