Remove exec bits on .doc file
[LibreOffice.git] / bin / find-unused-data.sh
blobe6e0217f0375e27228a337f435644c4e532273f1
1 #!/usr/bin/env bash
3 SCRIPT=$(realpath "$0")
4 SCRIPTPATH=$(dirname "$SCRIPT")
5 PATHS="$(find $SCRIPTPATH/.. \( -wholename '*/qa/*/testdocuments' -o -wholename '*/qa/*/testdocuments/*' -o -wholename '*/qa/*/data' -o -wholename '*/qa/*/data/*' \) -type d )"
7 for path in $PATHS
8 do
9 # Ignore pass/fail/indeterminate folders, functions test in sc, workdir folder and xml in sd
10 if [[ "$path" != */pass* ]] && [[ "$path" != */fail* ]] && [[ "$path" != */indeterminate* ]] \
11 && [[ "$path" != */functions* ]] && [[ "$path" != */workdir* ]] && [[ "$path" != */xml* ]]; then
12 for i in $path/*
14 if [ -f "$i" ]; then
15 file=$(basename "$i")
16 if ! git grep -q "$file"; then
17 echo "WARNING: $i is not used, write a testcase for it!"
20 done
22 done
24 # vi:set shiftwidth=4 expandtab: