Fix shellcheck SC2006 warnings in 'coverage' script

This commit is contained in:
rl1987 2018-11-11 17:44:41 +02:00 committed by George Kadianakis
parent 92f71b8e88
commit ce1b018ab7

View File

@ -8,19 +8,19 @@
dst=$1 dst=$1
for fn in src/core/*/*.c src/feature/*/*.c src/app/*/*.c src/lib/*/*.c; do for fn in src/core/*/*.c src/feature/*/*.c src/app/*/*.c src/lib/*/*.c; do
BN=`basename $fn` BN=$(basename $fn)
DN=`dirname $fn` DN=$(dirname $fn)
F=`echo $BN | sed -e 's/\.c$//;'` F=$(echo $BN | sed -e 's/\.c$//;')
GC="${BN}.gcov" GC="${BN}.gcov"
# Figure out the object file names # Figure out the object file names
ONS=`echo ${DN}/src_*-${F}.o` ONS=$(echo ${DN}/src_*-${F}.o)
ONS_WILDCARD_LITERAL="${DN}/src_*-${F}.o" ONS_WILDCARD_LITERAL="${DN}/src_*-${F}.o"
# If the wildcard didn't expand, no files # If the wildcard didn't expand, no files
if [ "$ONS" != "${ONS_WILDCARD_LITERAL}" ] if [ "$ONS" != "${ONS_WILDCARD_LITERAL}" ]
then then
for on in $ONS; do for on in $ONS; do
# We should have a gcno file # We should have a gcno file
GCNO=`echo $on | sed -e 's/\.o$/\.gcno/;'` GCNO=$(echo $on | sed -e 's/\.o$/\.gcno/;')
if [ -e $GCNO ] if [ -e $GCNO ]
then then
# No need to test for gcda, since gcov assumes no execution # No need to test for gcda, since gcov assumes no execution