diff options
author | thislooksfun <tlf@thislooks.fun> | 2021-10-26 13:12:59 -0500 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2021-11-02 12:23:30 +0100 |
commit | 3e32acc3e46e4a9fba728196e93ad539318790c3 (patch) | |
tree | 28add073d40ed7556d88a98c3d0e0c39ef4f20fa | |
parent | 170e956c80ebcfbb2ed3bedfb5cee2b53192efba (diff) | |
download | serenity-3e32acc3e46e4a9fba728196e93ad539318790c3.zip |
Meta: Add special case for macOS
macOS's `find` does not support the '-executable' flag, nor does it
support the '-perm /' syntax, but we can make it work with a special
case.
-rwxr-xr-x | Meta/lint-executable-resources.sh | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/Meta/lint-executable-resources.sh b/Meta/lint-executable-resources.sh index ac63461dc5..a7069c3f10 100755 --- a/Meta/lint-executable-resources.sh +++ b/Meta/lint-executable-resources.sh @@ -5,7 +5,12 @@ set -eo 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 [ "$(uname -s)" = "Darwin" ]; then + # MacOS's find does not support '-executable' OR '-perm /mode'. + BAD_FILES=$(find Base/etc/ Base/res/ Base/www/ -type f -perm +111) +else + BAD_FILES=$(find Base/etc/ Base/res/ Base/www/ -type f -executable) +fi if [ -n "${BAD_FILES}" ] then |