5 # Check entries that should be removed
8 for i in $(tail -n +12 00-INDEX |grep -E '^[a-zA-Z0-9]+'); do
10 obsolete="$obsolete $i"
14 # Check directory entries that should be added
17 for i in $(find . -maxdepth 1 -type d); do
18 if [ "$i" != "." ]; then
19 new=$(echo $i|perl -ne 's,./(.*),$1/,; print $_')
25 if [ "$(grep -P "^$i" 00-INDEX)" == "" ]; then
30 # Check file entries that should be added
33 for i in $(find . -maxdepth 1 -type f); do
34 if [ "$i" != "./.gitignore" ]; then
35 new=$(echo $i|perl -ne 's,./(.*),$1,; print $_')
41 if [ "$(grep -P "^$i\$" 00-INDEX)" == "" ]; then
48 echo -e "Documentation/00-INDEX check results:\n"
50 if [ "$obsolete" != "" ]; then
51 echo -e "- Should remove those entries:\n\t$obsolete\n"
53 echo -e "- No obsolete entries\n"
56 if [ "$dir" != "" ]; then
57 echo -e "- Should document those directories:\n\t$dir\n"
59 echo -e "- No new directories to add\n"
62 if [ "$file" != "" ]; then
63 echo -e "- Should document those files:\n\t$file"
65 echo "- No new files to add"