fp@2584: #!/bin/bash fp@2584: fp@2584: set -x fp@2584: fp@2584: KERNELDIR=/data/kernel/linux-3.8.13 fp@2584: PREVER=3.6 fp@2584: KERNELVER=3.8 fp@2584: fp@2584: for f in $KERNELDIR/drivers/net/ethernet/intel/e1000/*.[ch]; do fp@2584: echo $f fp@2584: b=$(basename $f) fp@2584: o=${b/\./-$KERNELVER-orig.} fp@2584: e=${b/\./-$KERNELVER-ethercat.} fp@2584: cp -v $f $o fp@2584: chmod 644 $o fp@2584: cp -v $o $e fp@2584: op=${b/\./-$PREVER-orig.} fp@2584: ep=${b/\./-$PREVER-ethercat.} fp@2584: diff -u $op $ep | patch -p1 $e fp@2584: sed -i s/$PREVER-ethercat.h/$KERNELVER-ethercat.h/ $e fp@2584: hg add $o $e fp@2584: done