fp@2546: #!/bin/bash fp@2546: fp@2546: set -x fp@2546: fp@2588: KERNELDIR=/data/kernel/linux-3.16.6 fp@2588: PREVER=3.14 fp@2588: KERNELVER=3.16 fp@2546: fp@2546: for f in $KERNELDIR/drivers/net/ethernet/intel/e1000e/*.[ch]; do fp@2546: echo $f fp@2546: b=$(basename $f) fp@2546: o=${b/\./-$KERNELVER-orig.} fp@2546: e=${b/\./-$KERNELVER-ethercat.} fp@2546: cp -v $f $o fp@2546: chmod 644 $o fp@2546: cp -v $o $e fp@2546: op=${b/\./-$PREVER-orig.} fp@2546: ep=${b/\./-$PREVER-ethercat.} fp@2546: 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@2546: done