X-Git-Url: http://git.asbjorn.biz/?p=rapper.git;a=blobdiff_plain;f=tools%2Flpcrc%2Flpcrc.sh;fp=tools%2Flpcrc%2Flpcrc.sh;h=ee36dd551e72ba8869f49c7d1d715d0f3d811128;hp=0000000000000000000000000000000000000000;hb=174cf615316851c4c2bff127afc2ad54070066d1;hpb=0163b16211dc58d6619b923b370be8491fb984cb diff --git a/tools/lpcrc/lpcrc.sh b/tools/lpcrc/lpcrc.sh new file mode 100755 index 0000000..ee36dd5 --- /dev/null +++ b/tools/lpcrc/lpcrc.sh @@ -0,0 +1,17 @@ +#!/bin/sh + +binary=$1 +source=$2 + +lpcrc=$(dirname $(readlink -f $0))/lpcrc + +crcoutput=$($lpcrc $1) + +echo "$crcoutput" | grep -q differs +if [ $? -eq 0 ] ; then + crc=$(echo "$crcoutput" | grep new_crc | cut -d' ' -f2) + sed -i -e \ + 's/^\(\s\+0x\)[a-f0-9]\{8\}\(,\s\+\/\/\ Interrupt CRC\)/\1'$crc'\2/g' \ + $source + make crc +fi