head	1.9;
access;
symbols;
locks; strict;
comment	@# @;


1.9
date	2003.12.11.03.23.36;	author dunc;	state Exp;
branches;
next	1.8;

1.8
date	2003.12.11.02.46.28;	author dunc;	state Exp;
branches;
next	1.7;

1.7
date	2003.08.28.07.31.23;	author dunc;	state Exp;
branches;
next	1.6;

1.6
date	2003.06.24.23.57.36;	author dunc;	state Exp;
branches;
next	1.5;

1.5
date	2003.01.14.21.58.52;	author dunc;	state Exp;
branches;
next	1.4;

1.4
date	2003.01.10.22.09.54;	author dunc;	state Exp;
branches;
next	1.3;

1.3
date	2003.01.10.22.06.01;	author dunc;	state Exp;
branches;
next	1.2;

1.2
date	2002.03.02.00.21.45;	author dunc;	state Exp;
branches;
next	1.1;

1.1
date	2002.01.28.01.26.22;	author dunc;	state Exp;
branches;
next	;


desc
@Patch linux from 2.4.2 up to 2.4.17
@


1.9
log
@All OK; also does RCS links
@
text
@#!/bin/sh
set -x
preserve_linux ()
{
  [ -L linux ] &&
  {
    RR=true
    real linux
  }
}
[ -n "$1" ] && i=$1 || i=$LINUX_SUBLEVEL
RR=false
R=false
[ $i -eq 3 ] &&
{
  preserve_linux
  bzcat /usr/gz/linux-2.4.2.tar.bz2|tar -xf -
}
while [ $i -le $LINUX_SUBLEVEL ];do
  [ $i -gt 18 ] &&
  {
    [ -d linux-2.4.$i ] &&
    {
      $R &&
      {
        echo "can't save linux-2.4.$i"
        exit 1
      }
      R=true
      k=$i
      real linux-2.4.$i
    }
    mv linux linux-2.4.$i
  }
  [ $i -eq 11 ] && j=-dontuse || j=""
  bzcat ~/newrev/patch-2.4.$i$j.bz2|patch -p0 > ~/newrev/pee$i 2>&1
  [ $i -gt 18 ] && mv linux-2.4.$i linux
  i=$[$i+1]
done
$RR && { mv linux linux-2.4.$LINUX_SUBLEVEL;unreal linux; }
$R && unreal linux-2.4.$k
cd linux-2.4.$LINUX_SUBLEVEL
ln -s /home/dunc/rcsdirs/linux RCS
cd drivers/cdrom
ln -s /home/dunc/rcsdirs/linuxdriverscdrom RCS
@


1.8
log
@Mostly build 2.4.23 properly
@
text
@d31 1
a32 1
    $R && real linux-2.4.$i
d42 4
@


1.7
log
@*** empty log message ***
@
text
@d3 1
a3 1
preserve_linux () \
d5 1
a5 1
  [ -L linux ] && \
d7 1
a7 1
    RR=:
d13 2
a14 1
[ $i -eq 3 ] && \
a18 1
k=$[$i-1]
d20 1
a20 1
  [ $i -gt 18 ] && \
d22 12
a33 3
    [ -d linux-2.4.$k ] && R=: || R=false
    $R && real linux-2.4.$k
    mv linux linux-2.4.$k
d37 1
a37 6
  [ $i -gt 18 ] && \
  {
    mv linux-2.4.$k linux
    $R && unreal linux-2.4.$k
  }
  k=$i
d41 1
@


1.6
log
@Automatically untar linux if patching 2.4.2
@
text
@d3 1
a3 3
[ -n "$1" ] && i=$1 || i=$LINUX_SUBLEVEL
RR=false
[ $i -eq 3 ] && \
d5 1
a5 1
  [ -e linux.real ] || \
a8 1
    bzcat /usr/gz/linux-2.4.2.tar.bz2|tar -xf -
d11 7
d20 2
a21 1
  if [ $i -gt 18 ];then
d25 1
a25 1
  fi
d28 2
a29 1
  if [ $i -gt 18 ];then
d32 1
a32 1
  fi
@


1.5
log
@Cater for amended naming convention after 2.4.18
@
text
@d4 10
d30 1
@


1.4
log
@Get Linux sublevel from environment
@
text
@d4 1
d6 5
d13 5
@


1.3
log
@Patch from rev $1 if given, else rev 18 as before
@
text
@d3 2
a4 2
[ -n "$1" ] && i=$1 || i=18
while [ $i -le 18 ];do
@


1.2
log
@Do 2.4.18
@
text
@d3 1
a3 1
i=18
@


1.1
log
@Do 2.4.3 - 17
@
text
@d3 2
a4 2
i=3
while [ $i -le 17 ];do
@
