Fix shellcheck issues in cov-diff - SC2231, SC2006 and SC2086

This commit is contained in:
rl1987 2018-11-11 19:18:49 +02:00 committed by George Kadianakis
parent 92f71b8e88
commit d9f7cb3f62
2 changed files with 6 additions and 3 deletions

3
changes/ticket28009 Normal file
View file

@ -0,0 +1,3 @@
o Code simplification and refactoring:
- Fix shellcheck warnings in cov-diff script. Resolves issue
28009.

View file

@ -7,9 +7,9 @@
DIRA="$1"
DIRB="$2"
for B in $DIRB/*; do
A=$DIRA/`basename $B`
if [ -f $A ]; then
for B in "$DIRB"/*; do
A=$DIRA/$(basename "$B")
if [ -f "$A" ]; then
perl -pe 's/^\s*\!*\d+(\*?):/ 1$1:/; s/^([^:]+:)[\d\s]+:/$1/; s/^ *-:(Runs|Programs):.*//;' "$A" > "$A.tmp"
else
cat /dev/null > "$A.tmp"