[!!!][TASK] Drop core 6->7 auto TCA migrations
[Packages/TYPO3.CMS.git] / Build / Scripts / checkUtf8Bom.sh
1 #!/usr/bin/env bash
2
3 #########################
4 #
5 # Check all UTF-8 files do not contain BOM.
6 #
7 # It expects to be run from the core root.
8 #
9 ##########################
10
11 FILES=`find . -type f \
12 ! -path "./bin/*" \
13 ! -path "./typo3conf/*" \
14 ! -path "./Build/node_modules/*" \
15 ! -path "./typo3temp/*" \
16 ! -path "./vendor/*" \
17 ! -path "./fileadmin/*" \
18 ! -path "./.git/*" \
19 ! -path "./index.php" \
20 ! -path "./.php_cs.cache" \
21 ! -path "./typo3/sysext/rte_ckeditor/Resources/Public/JavaScript/Contrib/*" \
22 ! -path "./typo3/sysext/rte_ckeditor/Resources/Public/JavaScript/Plugins/*" \
23 ! -path "./Build/bamboo/target/*" \
24 ! -path "./Build/JavaScript/*" \
25 ! -path "./typo3/sysext/*/Documentation-GENERATED-temp/*" \
26 -print0 | xargs -0 -n1 -P8 file {} | grep 'UTF-8 Unicode (with BOM)'`
27
28 if [ -n "${FILES}" ]; then
29 echo "Found UTF-8 files with BOM:";
30 echo ${FILES};
31 exit 1;
32 fi
33
34 exit 0