[FOLLOWUP][TASK] Update to jQuery 3.1.1
[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 IGNORE[0]="typo3/cli_dispatch.phpsh"
15 IGNORE[1]="typo3/sysext/core/Build/Scripts/cglFixMyCommit.sh"
16 IGNORE[2]="typo3/sysext/core/Build/Scripts/checkFilePermissions.sh"
17 IGNORE[3]="typo3/sysext/core/Build/Scripts/duplicateExceptionCodeCheck.sh"
18 IGNORE[4]="typo3/sysext/core/Build/Scripts/splitFunctionalTests.sh"
19 IGNORE[5]="typo3/sysext/core/Build/Scripts/xlfcheck.sh"
20 IGNORE[6]="typo3/sysext/core/Build/Scripts/validateRstFiles.sh"
21 IGNORE[7]="typo3/sysext/core/bin/typo3"
22
23 COUNTER=0
24
25 for FILE in $(find typo3/ -type f ! -perm 0644); do
26 if ! [[ ${IGNORE[*]} =~ "$FILE" ]]
27 then
28 echo $FILE
29 COUNTER=$((COUNTER+1))
30 fi
31 done
32
33 if [ ${COUNTER} -gt 0 ] ; then
34 echo "$COUNTER number of files have a wrong file permission set."
35 exit 1
36 fi
37
38 exit 0