Whamcloud - gitweb
Branch HEAD
[fs/lustre-release.git] / lustre / kernel_patches / scripts / unused-patches
1 #!/bin/sh
2
3 #
4 # List unused patches
5 #
6
7 . patchfns >/dev/null || . /usr/lib/patch-scripts/patchfns >/dev/null || { \
8         echo "Impossible to find my library 'patchfns'."
9         echo "Check your install, or go to the right directory"
10         exit 1
11 }
12
13 usage()
14 {
15         echo "Usage: unused-patches"
16         exit 1
17 }
18
19 if [ $# -ne 0 ] 
20 then
21         usage
22 fi
23
24 for FILE in $(ls $P/patches)
25 do
26         BASE=`stripit $FILE`
27 #       echo checking $BASE in $P/patches
28         if  grep $FILE $P/series/*  >&  /dev/null ; then 
29                 true
30 #                echo $FILE found in $P/series
31         else 
32             if [ $BASE != CVS ]; then
33                 echo patches/$FILE
34                 echo txt/$BASE.txt
35                 echo pc/$BASE.pc
36             fi
37         fi
38 done
39