Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 77957
b: refs/heads/master
c: 22d6a6a
h: refs/heads/master
i:
  77955: dd1be58
v: v3
  • Loading branch information
Andreas Mohr authored and Sam Ravnborg committed Jan 28, 2008
1 parent 616f199 commit 17b7290
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 13 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 7491a76b23f5100823098b9d5d74ef18a2ca0dc1
refs/heads/master: 22d6a6a018d897c9c77c6af164722926e70108fa
22 changes: 10 additions & 12 deletions trunk/scripts/patch-kernel
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ sourcedir=${1-/usr/src/linux}
patchdir=${2-.}
stopvers=${3-default}

if [ "$1" == -h -o "$1" == --help -o ! -r "$sourcedir/Makefile" ]; then
if [ "$1" = -h -o "$1" = --help -o ! -r "$sourcedir/Makefile" ]; then
cat << USAGE
usage: $PNAME [-h] [ sourcedir [ patchdir [ stopversion ] [ -acxx ] ] ]
source directory defaults to /usr/src/linux,
Expand Down Expand Up @@ -182,10 +182,12 @@ reversePatch () {
}

# set current VERSION, PATCHLEVEL, SUBLEVEL, EXTRAVERSION
TMPFILE=`mktemp .tmpver.XXXXXX` || { echo "cannot make temp file" ; exit 1; }
# force $TMPFILEs below to be in local directory: a slash character prevents
# the dot command from using the search path.
TMPFILE=`mktemp ./.tmpver.XXXXXX` || { echo "cannot make temp file" ; exit 1; }
grep -E "^(VERSION|PATCHLEVEL|SUBLEVEL|EXTRAVERSION)" $sourcedir/Makefile > $TMPFILE
tr -d [:blank:] < $TMPFILE > $TMPFILE.1
source $TMPFILE.1
. $TMPFILE.1
rm -f $TMPFILE*
if [ -z "$VERSION" -o -z "$PATCHLEVEL" -o -z "$SUBLEVEL" ]
then
Expand All @@ -202,11 +204,7 @@ echo "Current kernel version is $VERSION.$PATCHLEVEL.$SUBLEVEL${EXTRAVERSION} ($
EXTRAVER=
if [ x$EXTRAVERSION != "x" ]
then
if [ ${EXTRAVERSION:0:1} == "." ]; then
EXTRAVER=${EXTRAVERSION:1}
else
EXTRAVER=$EXTRAVERSION
fi
EXTRAVER=${EXTRAVERSION#.}
EXTRAVER=${EXTRAVER%%[[:punct:]]*}
#echo "$PNAME: changing EXTRAVERSION from $EXTRAVERSION to $EXTRAVER"
fi
Expand Down Expand Up @@ -251,16 +249,16 @@ while : # incrementing SUBLEVEL (s in v.p.s)
do
CURRENTFULLVERSION="$VERSION.$PATCHLEVEL.$SUBLEVEL"
EXTRAVER=
if [ $stopvers == $CURRENTFULLVERSION ]; then
if [ $stopvers = $CURRENTFULLVERSION ]; then
echo "Stopping at $CURRENTFULLVERSION base as requested."
break
fi

SUBLEVEL=$((SUBLEVEL + 1))
SUBLEVEL=$(($SUBLEVEL + 1))
FULLVERSION="$VERSION.$PATCHLEVEL.$SUBLEVEL"
#echo "#___ trying $FULLVERSION ___"

if [ $((SUBLEVEL)) -gt $((STOPSUBLEVEL)) ]; then
if [ $(($SUBLEVEL)) -gt $(($STOPSUBLEVEL)) ]; then
echo "Stopping since sublevel ($SUBLEVEL) is beyond stop-sublevel ($STOPSUBLEVEL)"
exit 1
fi
Expand Down Expand Up @@ -297,7 +295,7 @@ fi
if [ x$gotac != x ]; then
# Out great user wants the -ac patches
# They could have done -ac (get latest) or -acxx where xx=version they want
if [ $gotac == "-ac" ]; then
if [ $gotac = "-ac" ]; then
# They want the latest version
HIGHESTPATCH=0
for PATCHNAMES in $patchdir/patch-${CURRENTFULLVERSION}-ac*\.*
Expand Down

0 comments on commit 17b7290

Please sign in to comment.