Whamcloud - gitweb
- merge 0.7rc1 from b_devel to HEAD (20030612 merge point)
[fs/lustre-release.git] / lustre / kernel_patches / scripts / unused-patches
diff --git a/lustre/kernel_patches/scripts/unused-patches b/lustre/kernel_patches/scripts/unused-patches
new file mode 100755 (executable)
index 0000000..2f3a70a
--- /dev/null
@@ -0,0 +1,39 @@
+#!/bin/sh
+
+#
+# List unused patches
+#
+
+. patchfns >/dev/null || . /usr/lib/patch-scripts/patchfns >/dev/null || { \
+       echo "Impossible to find my library 'patchfns'."
+       echo "Check your install, or go to the right directory"
+       exit 1
+}
+
+usage()
+{
+       echo "Usage: unused-patches"
+       exit 1
+}
+
+if [ $# -ne 0 ] 
+then
+       usage
+fi
+
+for FILE in $(ls $P/patches)
+do
+        BASE=`stripit $FILE`
+#       echo checking $BASE in $P/patches
+       if  grep $FILE $P/series/*  >&  /dev/null ; then 
+                true
+#                echo $FILE found in $P/series
+        else 
+            if [ $BASE != CVS ]; then
+                echo patches/$FILE
+                echo txt/$BASE.txt
+                echo pc/$BASE.pc
+            fi
+       fi
+done
+