From 0761c062ec9df1785fd306f9937f160322c61086 Mon Sep 17 00:00:00 2001 From: phil Date: Thu, 24 Oct 2019 16:50:38 -0400 Subject: [PATCH] add compare: script to remove annotations and diff src and scan dir files --- tools/compare | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100755 tools/compare diff --git a/tools/compare b/tools/compare new file mode 100755 index 0000000..32e04f1 --- /dev/null +++ b/tools/compare @@ -0,0 +1,19 @@ +#!/bin/sh + +# shell script to help compare src/{cmd,sys}/file and scans/file + +SCAN=$1 +SRC=$2 + +TMPDIR=/tmp/compare$$ +trap "rm -fr $TMPDIR" 0 +mkdir -p $TMPDIR/scan $TMPDIR/src + +F=`basename $SCAN` +TSCAN=$TMPDIR/scan/$F +TSRC=$TMPDIR/src/$F + +sed -e '/^ *"/d' -e 's/ *".*$//' < $SCAN > $TSCAN +sed -e '/^ *"/d' -e 's/ *".*$//' < $SRC > $TSRC + +diff -uw $TSCAN $TSRC