1
0
mirror of https://github.com/livingcomputermuseum/pdp7-unix.git synced 2026-04-20 09:37:03 +00:00

add compare: script to remove annotations and diff src and scan dir files

This commit is contained in:
phil
2019-10-24 16:50:38 -04:00
parent 710dd89a49
commit 0761c062ec

19
tools/compare Executable file
View File

@@ -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