fp@2584: #!/bin/bash fp@2584: fp@2584: set -x fp@2584: fp@2588: KERNELDIR=/data/kernel/linux-3.16.6 fp@2588: PREVER=3.14 fp@2588: KERNELVER=3.16 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