[BUGFIX] Apply enableFields in JOIN's ON condition
[Packages/TYPO3.CMS.git] / 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/bin/typo3"
16 )
17
18 COUNTER=0
19
20 for FILE in $(find typo3/ -type f ! -perm 0644); do
21 if ! [[ ${IGNORE[*]} =~ "$FILE" ]]
22 then
23 echo $FILE
24 COUNTER=$((COUNTER+1))
25 fi
26 done
27
28 if [ ${COUNTER} -gt 0 ] ; then
29 echo "$COUNTER number of files have a wrong file permission set."
30 exit 1
31 fi
32
33 exit 0