diff options
author | Ralf Baechle <ralf@linux-mips.org> | 1998-03-17 22:05:47 +0000 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 1998-03-17 22:05:47 +0000 |
commit | 27cfca1ec98e91261b1a5355d10a8996464b63af (patch) | |
tree | 8e895a53e372fa682b4c0a585b9377d67ed70d0e /scripts/patch-kernel | |
parent | 6a76fb7214c477ccf6582bd79c5b4ccc4f9c41b1 (diff) |
Look Ma' what I found on my harddisk ...
o New faster syscalls for 2.1.x, too
o Upgrade to 2.1.89.
Don't try to run this. It's flaky as hell. But feel free to debug ...
Diffstat (limited to 'scripts/patch-kernel')
-rw-r--r-- | scripts/patch-kernel | 42 |
1 files changed, 35 insertions, 7 deletions
diff --git a/scripts/patch-kernel b/scripts/patch-kernel index 2028efcbc..f5abe4440 100644 --- a/scripts/patch-kernel +++ b/scripts/patch-kernel @@ -11,6 +11,11 @@ # successful. If it is, then all of the "*.orig" files are removed. # # Nick Holloway <Nick.Holloway@alfie.demon.co.uk>, 2nd January 1995. +# +# Added support for handling multiple types of compression. What includes +# gzip, bzip, bzip2, zip, compress, and plaintext. +# +# Adam Sulmicki <adam@cfar.umd.edu>, 1st January 1997. # Set directories from arguments, or use defaults. sourcedir=${1-/usr/src/linux} @@ -29,16 +34,39 @@ echo "Current kernel version is $VERSION.$PATCHLEVEL.$SUBLEVEL" while : do SUBLEVEL=`expr $SUBLEVEL + 1` - patch=patch-$VERSION.$PATCHLEVEL.$SUBLEVEL.gz - if [ ! -r $patchdir/$patch ] - then - break + patch=patch-$VERSION.$PATCHLEVEL.$SUBLEVEL + if [ -r $patchdir/${patch}.gz ]; then + ext=".gz" + name="gzip" + uncomp="gunzip -dc" + elif [ -r $patchdir/${patch}.bz ]; then + ext=".bz" + name="bzip" + uncomp="bunzip -dc" + elif [ -r $patchdir/${patch}.bz2 ]; then + ext=".bz2" + name="bzip2" + uncomp="bunzip2 -dc" + elif [ -r $patchdir/${patch}.zip ]; then + ext=".zip" + name="zip" + uncomp="unzip -d" + elif [ -r $patchdir/${patch}.Z ]; then + ext=".Z" + name="uncompress" + uncomp="uncompress -c" + elif [ -r $patchdir/${patch} ]; then + ext="" + name="plaintext" + uncomp="cat" + else + break fi - echo -n "Applying $patch... " - if gunzip -dc $patchdir/$patch | patch -p1 -s -N -E -d $sourcedir + echo -n "Applying ${patch} (${name})... " + if $uncomp ${patchdir}/${patch}${ext} | patch -p1 -s -N -E -d $sourcedir then - echo "done." + echo "done." else echo "failed. Clean up yourself." break |