lkml.org 
[lkml]   [2011]   [Apr]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 3/4 v2] Documentation/00-INDEX.sh: add script to help keeping the index up-to-date
Date
v2: Use [[:space:]] instead of \s for better portability, thanks to Randy Dunlap.

Signed-off-by: Cyril Brulebois <kibi@debian.org>
---
Documentation/00-INDEX.sh | 24 ++++++++++++++++++++++++
1 files changed, 24 insertions(+), 0 deletions(-)
create mode 100755 Documentation/00-INDEX.sh

diff --git a/Documentation/00-INDEX.sh b/Documentation/00-INDEX.sh
new file mode 100755
index 0000000..650477e
--- /dev/null
+++ b/Documentation/00-INDEX.sh
@@ -0,0 +1,24 @@
+#!/bin/sh
+# Copyright 2011 Cyril Brulebois <kibi@debian.org>
+#
+# Try and keep the 00-INDEX file up-to-date.
+
+# List all entries below the 00-INDEX entry:
+documented=$(sed '1,/^00-INDEX$/d' 00-INDEX|grep -v '^[[:space:]]'|sed 's,/$,,')
+
+# List all files/directories except 00-INDEX* and Makefile:
+present=$(ls -1|grep -v '^00-INDEX'|grep -v '^Makefile$')
+
+echo "Undocumented:"
+for i in $present; do
+ if ! echo "$documented"|grep -qs "\<$i\>"; then
+ echo " $i"
+ fi
+done
+
+echo "Documented but missing:"
+for i in $documented; do
+ if [ ! -e $i ]; then
+ echo " $i"
+ fi
+done
--
1.7.4.4


\
 
 \ /
  Last update: 2011-04-28 14:47    [W:1.308 / U:0.124 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site