]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
scripts/bad_stable: allow multiple kernel versions at the same time
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 4 Feb 2019 09:06:59 +0000 (10:06 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 4 Feb 2019 09:06:59 +0000 (10:06 +0100)
This moves the command line options around, from:
bad_stable KERNEL_VERSION GIT_ID
to:
bad_stable GIT_ID KERNEL_VERSION...

where KERNEL_VERSION... is now able to be a list of kernel versions that
the commit failed on.

This should save us some typing...

Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
scripts/bad_stable

index 1f8548b771aac588f5899a32bbbfdb6b855bda67..ee49499017dd4aeeb9a18e0a6483b71853d79128 100755 (executable)
@@ -46,7 +46,7 @@ author()
                fi
 
                # if this is the start of the diff, then it's time to stop looking
-               diff=$(echo "$l" | grep "^---")
+               diff=$(echo "$l" | grep "^--- ")
                if [ x"$diff" != x ]
                then
                        #echo "diffstart!!!!!"
@@ -161,18 +161,20 @@ reply()
                ~/bin/msmtp-enqueue.sh -a coco $to
 }
 
-STABLE_VERSION="$1"
+git_id="$1"
 shift
 
-if [ "${STABLE_VERSION}" == "" ] ; then
-       echo "Must provide kernel version to be told is bad\n"
+if [ "${git_id}" == "" ] ; then
+       echo "bad_stable GIT_ID KERNEL_VERSION"
+       echo "Must provide kernel version to be told is bad"
        exit;
 fi
 
-echo "STABLE_VERSION = ${STABLE_VERSION}"
+echo "git_id = ${git_id}"
 
-for git_id in $*
+for STABLE_VERSION in $*
 do
+       echo "bad version = ${STABLE_VERSION}"
        TMPFILE=`mktemp bad_patch.XXXXX` || exit 1
        git show --pretty=email $git_id > $TMPFILE
        reply $TMPFILE