Whamcloud - gitweb
LU-2916 llite: call ll_permission rather than inode_permission
[fs/lustre-release.git] / build / confirmpatches.sh
index 7e33291..7531aa1 100755 (executable)
@@ -3,6 +3,7 @@ PROG=$(basename $0)
 [ "$1" = "-h" -o "$1" = "--help" ] && echo "usage: $PROG [patch dir]" && exit 0
 [ "$1" = "-v" ] && shift && VERBOSE="echo" || VERBOSE=":"
 
+[ "$1" ] && BASEDIR="$1"
 BASEDIR=${BASEDIR:-lustre/kernel_patches}
 SERIESPATH=${SERIESPATH:-$BASEDIR/series}
 PATCHPATH=${PATCHPATH:-$BASEDIR/patches}
@@ -11,11 +12,11 @@ PATCHPATH=${PATCHPATH:-$BASEDIR/patches}
 [ ! -d "$SERIESPATH" ] && echo "$PROG: missing series '$SERIESPATH'" && exit 2
 [ ! -d "$PATCHPATH" ] && echo "$PROG: missing patches '$PATCHPATH'" && exit 3
 
-for SERIES in $(ls $SERIESPATH | egrep -v "CVS|~$|.orig") ; do
+for SERIES in $(ls $SERIESPATH | egrep -v "~$|.orig|.rej") ; do
        $VERBOSE "series: $SERIES"
        for PATCH in $(grep -v "^#" $SERIESPATH/$SERIES); do
                $VERBOSE $PATCH
-               if [ ! $(find $PATCHPATH -name $PATCH) ]; then
+               if [ ! -e $PATCHPATH/$PATCH ]; then
                        echo "$SERIESPATH/$SERIES: patch '$PATCH' not found!"
                fi
        done