removed dependency on 'readlink -f'
[rapper.git] / tools / lpcrc / lpcrc.sh
index ee36dd5..690b807 100755 (executable)
@@ -3,7 +3,7 @@
 binary=$1
 source=$2
 
-lpcrc=$(dirname $(readlink -f $0))/lpcrc
+lpcrc=$(echo $0 | sed -e 's/.sh$//g')
 
 crcoutput=$($lpcrc $1)
 
@@ -11,7 +11,7 @@ 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' \
+         's/^\(#define CRC_CHECKSUM 0x\)[a-f0-9]\{8\}$/\1'$crc'/g' \
          $source
        make crc
 fi