summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorthislooksfun <tlf@thislooks.fun>2021-10-26 13:12:59 -0500
committerAndreas Kling <kling@serenityos.org>2021-11-02 12:23:30 +0100
commit3e32acc3e46e4a9fba728196e93ad539318790c3 (patch)
tree28add073d40ed7556d88a98c3d0e0c39ef4f20fa
parent170e956c80ebcfbb2ed3bedfb5cee2b53192efba (diff)
downloadserenity-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-xMeta/lint-executable-resources.sh7
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