[CLEANUP] Simplify checkFilePermissions.sh ignore list
[Packages/TYPO3.CMS.git] / typo3 / sysext / core / Build / Scripts / checkFilePermissions.sh
1 #!/bin/bash
2
3 #########################
4 #
5 # Check all files for their file permission.
6 # An array of files to be excluded is in place.
7 #
8 # It expects to be run from the core root.
9 #
10 ##########################
11
12 # Array of files to ignore the file permission check
13 IGNORE=(
14 "typo3/cli_dispatch.phpsh"
15 "typo3/sysext/core/Build/Scripts/cglFixMyCommit.sh"
16 "typo3/sysext/core/Build/Scripts/checkFilePermissions.sh"
17 "typo3/sysext/core/Build/Scripts/duplicateExceptionCodeCheck.sh"
18 "typo3/sysext/core/Build/Scripts/splitFunctionalTests.sh"
19 "typo3/sysext/core/Build/Scripts/xlfcheck.sh"
20 "typo3/sysext/core/Build/Scripts/validateRstFiles.sh"
21 "typo3/sysext/core/bin/typo3"
22 )
23
24 COUNTER=0
25
26 for FILE in $(find typo3/ -type f ! -perm 0644); do
27 if ! [[ ${IGNORE[*]} =~ "$FILE" ]]
28 then
29 echo $FILE
30 COUNTER=$((COUNTER+1))
31 fi
32 done
33
34 if [ ${COUNTER} -gt 0 ] ; then
35 echo "$COUNTER number of files have a wrong file permission set."
36 exit 1
37 fi
38
39 exit 0