diff options
author | Nick Mathewson <nickm@torproject.org> | 2017-09-28 08:53:16 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2017-09-28 08:53:16 -0400 |
commit | 9727a9248a474909c0ad53be9d55cd39b69d0611 (patch) | |
tree | 7c07372f8d1785a431bb328efe062f535e020869 /scripts | |
parent | 99e52711bb46123b49b02386db0464d351822e63 (diff) | |
download | tor-9727a9248a474909c0ad53be9d55cd39b69d0611.tar.gz tor-9727a9248a474909c0ad53be9d55cd39b69d0611.zip |
Improve cov-diff script to account for new files.
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/test/cov-diff | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/scripts/test/cov-diff b/scripts/test/cov-diff index 7da7f0be9d..ed8874d2d3 100755 --- a/scripts/test/cov-diff +++ b/scripts/test/cov-diff @@ -7,9 +7,13 @@ DIRA="$1" DIRB="$2" -for A in $DIRA/*; do - B=$DIRB/`basename $A` - perl -pe 's/^\s*\!*\d+:/ 1:/; s/^([^:]+:)[\d\s]+:/$1/; s/^ *-:(Runs|Programs):.*//;' "$A" > "$A.tmp" +for B in $DIRB/*; do + A=$DIRA/`basename $B` + if [ -f $A ]; then + perl -pe 's/^\s*\!*\d+:/ 1:/; s/^([^:]+:)[\d\s]+:/$1/; s/^ *-:(Runs|Programs):.*//;' "$A" > "$A.tmp" + else + cat /dev/null > "$A.tmp" + fi perl -pe 's/^\s*\!*\d+:/ 1:/; s/^([^:]+:)[\d\s]+:/$1/; s/^ *-:(Runs|Programs):.*//;' "$B" > "$B.tmp" diff -u "$A.tmp" "$B.tmp" rm "$A.tmp" "$B.tmp" |