Filter out more diff noice

This commit is contained in:
Anders Jenbo
2019-06-14 20:49:50 +02:00
parent eb36115ed9
commit 9252e7c889
+3 -3
View File
@@ -1,9 +1,9 @@
#!/bin/sh
set -e
diff /root/orig_full.asm compare_full.asm > /tmp/asm.diff || true
insertions=$(cat /tmp/asm.diff | grep "^+" | wc -l)
deletions=$(cat /tmp/asm.diff | grep "^-" | wc -l)
total=$(cat /root/orig_full.asm | wc -l)
insertions=$(cat /tmp/asm.diff | grep -v "asm" | grep "^+" | grep -vc ';')
deletions=$(cat /tmp/asm.diff | grep -v "asm" | grep "^-" | grep -vc ';')
total=$(grep -v ^$ /root/orig_full.asm | grep -vc ';')
accuracy="$(((insertions + deletions) / (total * 2 / 100)))% change, $((insertions)) insertions(+), $((deletions)) deletions(-)"
echo "$accuracy" > accuracy.txt
echo "$accuracy"