* cygmagic: Eliminate unneeded use of 'tr' and 'bc'.

This commit is contained in:
Christopher Faylor
2001-12-30 18:52:19 +00:00
parent 5d3949b064
commit cdd3a8bd67
2 changed files with 5 additions and 1 deletions

View File

@@ -10,7 +10,7 @@ EOF
while [ -n "$1" ]; do
define=$1; shift
struct=$1; shift
sum=`$gcc -E $file | sed -n "/^$struct/,/^};/p" | sed -e 's/[ ]//g' -e '/^$/d' | sum | awk '{print "obase=16;\"0x\";", $1}' | bc | tr '[A-Z]' '[a-z]'`
sum=`$gcc -E $file | sed -n "/^$struct/,/^};/p" | sed -e 's/[ ]//g' -e '/^$/d' | sum | awk '{printf "0x%x", $1}'`
echo "#define $define $sum"
curr=`sed -n "s/^#[ ]*define CURR_$define[ ][ ]*\([^ ][^ ]*\)/\1/p" $file`
[ "$curr" == "$sum" ] || echo "*** WARNING WARNING WARNING WARNING WARNING ***