[BUGFIX] Apply enableFields in JOIN's ON condition
[Packages/TYPO3.CMS.git] / Build / Scripts / maxFilePathLength.sh
1 #!/bin/bash
2
3 #########################
4 #
5 # Limit core file+dir length.
6 # This script finds relative files that exceeds a specific length
7 # in total. This is a measure against systems that can handle only
8 # a limited maximum absolute path length - a recurring issue especially
9 # on windows systems.
10 #
11 # Rule is simple: If this script returns with not 0, for instance by
12 # a bamboo pre-merge test, then shorten the offending path / file
13 # combination somehow.
14 #
15 # This script expects to be run from the core root.
16 #
17 ##########################
18
19 LIMIT=160
20
21 RESULT=0
22 for FILE in $(find typo3/ -type f); do
23 LENGTH=`echo ${FILE} | wc -m`
24 if [[ ${LENGTH} -gt ${LIMIT} ]]; then
25 echo "Maximum path length ${LIMIT} violated with ${LENGTH} characters for file ${FILE}"
26 RESULT=1
27 fi
28 done
29
30 exit $RESULT