2 # SPDX-License-Identifier: GPL-2.0
6 # Check entries that should be removed
9 for i
in $
(tail -n +12 00-INDEX |
grep -E '^[a-zA-Z0-9]+'); do
11 obsolete
="$obsolete $i"
15 # Check directory entries that should be added
18 for i
in $
(find .
-maxdepth 1 -type d
); do
19 if [ "$i" != "." ]; then
20 new
=$
(echo $i|perl
-ne 's,./(.*),$1/,; print $_')
26 if [ "$(grep -P "^
$i" 00-INDEX)" == "" ]; then
31 # Check file entries that should be added
34 for i
in $
(find .
-maxdepth 1 -type f
); do
35 if [ "$i" != "./.gitignore" ]; then
36 new
=$
(echo $i|perl
-ne 's,./(.*),$1,; print $_')
42 if [ "$(grep -P "^
$i\$
" 00-INDEX)" == "" ]; then
49 echo -e "Documentation/00-INDEX check results:\n"
51 if [ "$obsolete" != "" ]; then
52 echo -e "- Should remove those entries:\n\t$obsolete\n"
54 echo -e "- No obsolete entries\n"
57 if [ "$dir" != "" ]; then
58 echo -e "- Should document those directories:\n\t$dir\n"
60 echo -e "- No new directories to add\n"
63 if [ "$file" != "" ]; then
64 echo -e "- Should document those files:\n\t$file"
66 echo "- No new files to add"