Skip to content

Commit

Permalink
Meta: Ensure that icons and other resources remain non-executable
Browse files Browse the repository at this point in the history
  • Loading branch information
BenWiederhake authored and awesomekling committed Jul 28, 2020
1 parent 3a04e75 commit 8aa6b13
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
1 change: 1 addition & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
15 changes: 15 additions & 0 deletions Meta/lint-executable-resources.sh
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 8aa6b13

Please sign in to comment.