* [PATCH] scripts/patch-kernel bk support
@ 2003-05-02 16:25 Wiktor Wodecki
0 siblings, 0 replies; only message in thread
From: Wiktor Wodecki @ 2003-05-02 16:25 UTC (permalink / raw)
To: linux-kernel
[-- Attachment #1: Type: text/plain, Size: 266 bytes --]
Hello,
this patch adds -bk support to scripts/patch-kernel. Just a small hack.
Consider applying.
--
Regards,
Wiktor Wodecki
wodecki@gmx.de
+++ GMX - Mail, Messaging & more http://www.gmx.net +++
Bitte lächeln! Fotogalerie online mit GMX ohne eigene Homepage!
[-- Attachment #2: patch-kernel.patch --]
[-- Type: application/octet-stream, Size: 3628 bytes --]
--- patch-kernel.orig 2003-05-02 17:47:53.000000000 +0200
+++ patch-kernel 2003-05-02 17:47:53.000000000 +0200
@@ -1,6 +1,6 @@
#! /bin/sh
# Script to apply kernel patches.
-# usage: patch-kernel [ sourcedir [ patchdir [ stopversion ] [ -acxx ] ] ]
+# usage: patch-kernel [ sourcedir [ patchdir [ stopversion ] [ -acxx || -bkxx ] ] ]
# The source directory defaults to /usr/src/linux, and the patch
# directory defaults to the current directory.
# e.g.
@@ -41,6 +41,11 @@
# Added -ac option, use -ac or -ac9 (say) to stop at a particular version
# Dave Gilbert <linux@treblig.org>, 29th September 2001.
+# Added ability to deal with -bk patches from linus
+#
+# Added -bk option, use -bk or -bk9 (say) to stop at a particular version
+# Wiktor Wodecki <wodecki@wodecki.de>, 02th May 2003.
+
# Set directories from arguments, or use defaults.
sourcedir=${1-/usr/src/linux}
patchdir=${2-.}
@@ -48,19 +53,19 @@
if [ "$1" = -h -o "$1" = --help -o ! -r "$sourcedir/Makefile" ]; then
cat << USAGE
-usage: patch-kernel [-h] [ sourcedir [ patchdir [ stopversion ] [ -acxx ] ] ]
+usage: patch-kernel [-h] [ sourcedir [ patchdir [ stopversion ] [ -acxx | -bkxx ] ] ]
The source directory defaults to /usr/src/linux, and
the patch directory defaults to the current directory.
USAGE
exit 1
fi
-# See if we have any -ac options
+# See if we have any -ac/-bk options
for PARM in $*
do
case $PARM in
- -ac*)
- gotac=$PARM;
+ -ac*|-bk*)
+ gotbleeding=$PARM;
esac;
done
@@ -163,39 +168,39 @@
applyPatch $patch || break
done
-if [ x$gotac != x ]; then
- # Out great user wants the -ac patches
+if [ x$gotbleeding != x ]; then
+ # Out great user wants the -ac/bk patches
# They could have done -ac (get latest) or -acxx where xx=version they want
- if [ $gotac == "-ac" ]
+ if [ $gotbleeding == "-ac" ] || [ $gotbleeding == "-bk" ]
then
# They want the latest version
HIGHESTPATCH=0
- for PATCHNAMES in $patchdir/patch-${CURRENTFULLVERSION}-ac*\.*
+ for PATCHNAMES in $patchdir/patch-${CURRENTFULLVERSION}-${gotbleeding}*\.*
do
- ACVALUE=`echo $PATCHNAMES | sed -e 's/^.*patch-[0-9.]*-ac\([0-9]*\).*/\1/'`
+ BLEEDVALUE=`echo $PATCHNAMES | sed -e 's/^.*patch-[0-9.]*-${gotbleeding}\([0-9]*\).*/\1/'`
# Check it is actually a recognised patch type
- findFile $patchdir/patch-${CURRENTFULLVERSION}-ac${ACVALUE} || break
+ findFile $patchdir/patch-${CURRENTFULLVERSION}-${gotbleeding}${BLEEDVALUE} || break
- if [ $ACVALUE -gt $HIGHESTPATCH ]
+ if [ $BLEEDVALUE -gt $HIGHESTPATCH ]
then
- HIGHESTPATCH=$ACVALUE
+ HIGHESTPATCH=$BLEEDVALUE
fi
done
if [ $HIGHESTPATCH -ne 0 ]
then
- findFile $patchdir/patch-${CURRENTFULLVERSION}-ac${HIGHESTPATCH} || break
- applyPatch patch-${CURRENTFULLVERSION}-ac${HIGHESTPATCH}
+ findFile $patchdir/patch-${CURRENTFULLVERSION}-${gotbleeding}${HIGHESTPATCH} || break
+ applyPatch patch-${CURRENTFULLVERSION}-${gotbleeding}${HIGHESTPATCH}
else
- echo "No ac patches found"
+ echo "No `echo $gotbleeding|awk -F\- '{print $2}'` patches found"
fi
else
# They want an exact version
- findFile $patchdir/patch-${CURRENTFULLVERSION}${gotac} || {
- echo "Sorry, I couldn't find the $gotac patch for $CURRENTFULLVERSION. Hohum."
+ findFile $patchdir/patch-${CURRENTFULLVERSION}${gotbleeding} || {
+ echo "Sorry, I couldn't find the `echo $gotbleeding|awk -F\- '{print $2}'` patch for $CURRENTFULLVERSION. Hohum."
exit 1
}
- applyPatch patch-${CURRENTFULLVERSION}${gotac}
+ applyPatch patch-${CURRENTFULLVERSION}${gotbleeding}
fi
fi
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2003-05-02 16:13 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-05-02 16:25 [PATCH] scripts/patch-kernel bk support Wiktor Wodecki
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®