#!/bin/sh # # This makes the newest Linux kernel source archive CWD=`pwd` echo "Building Linux kernel from linux-1.3.0.tar.gz + patches." echo echo -n "Where would you like to build the kernel source tree [/tmp]? " read DIR; if [ "$DIR" = "" ]; then DIR=/tmp fi if [ ! -d $DIR ]; then mkdir -p $DIR fi echo cd $DIR rm -rf linux tar xzvf $CWD/linux-1.3.0.tar.gz for file in $CWD/patch-1.3.?.gz $CWD/patch-1.3.??.gz ; do echo "*******************************************************" echo echo "Patch file: $file" echo echo "*******************************************************" zcat $file | patch -p0 done cd linux find . -name "*.orig" -print | xargs rm --verbose ls