Debian Codegraph @

tools/internal/check_no_accidental_executable

raw symbols SCIP
1 #!/usr/bin/env bash
2 set -euo pipefail
3
4 # ----------------------------------------------------------------------------
5 # Test there are no files with accidentally set executable attribute.
6 # (This may happen if commiting from FAT filesystems on Unix.)
7 # ----------------------------------------------------------------------------
8
9 cd "$CASTLE_ENGINE_PATH"
10
11 ./tools/build-tool/castle-engine_compile.sh
12 mv -f ./tools/build-tool/castle-engine ./castle-engine-preserve
13
14 make clean BUILD_TOOL="`pwd`"/castle-engine-preserve > /dev/null
15
16 rm -f ./castle-engine-preserve
17
18 # Note: we allow executable bit on libraries in
19 # tools/build-tool/data/android/integrated-services/*.so .
20 # The ndk-build indeed sets executable bit on them,
21 # can be tested by "make build" in https://github.com/castle-engine/libpng-android .
22 # Reasons unknown, we could fight with it (doing "chmod -x ...")
23 # but it seems pointless, so we leave the executable bit.
24
25 find . '(' -type d -name .git -prune -false ')' -or \
26 '(' -type f '(' -name '*.sh' -or \
27 -name '*~' -or \
28 -name 'gradlew' -or \
29 -path './examples/instantfpc/castle_*' -or \
30 -name 'astcenc-*' -or \
31 -path './tools/internal/lazbuild_retry' -or \
32 -path './tools/internal/check_no_accidental_executable' -or \
33 -path './tools/internal/upload_github_release' -or \
34 -path './tools/internal/cge_shell_tests' -or \
35 -path './tools/internal/examples_regenerate_auto_files' -or \
36 -path './tools/internal/check_castle_window_backends_compilation' -or \
37 -path './tools/internal/examples_edit_readmes' -or \
38 -path './tools/internal/examples_edit_readmes_helper' -or \
39 -path './tools/internal/check_lpg_compilation' -or \
40 -path './tools/internal/check_build_tool_output' -or \
41 -path './tools/build-tool/data/android/integrated-services/*.so' \
42 ')' ')' -or \
43 '(' -executable -type f -print ')'