fix a couple of issues in shell scripts found by codacy.
This commit is contained in:
parent
00fd38967f
commit
ecc91ba914
|
@ -1,4 +1,4 @@
|
||||||
#/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
xsltproc -o manual.html /usr/share/xml/docbook/stylesheet/nwalsh/xhtml/docbook.xsl manual.docbook
|
xsltproc -o manual.html /usr/share/xml/docbook/stylesheet/nwalsh/xhtml/docbook.xsl manual.docbook
|
||||||
|
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
set -e # abort on error
|
set -e # abort on error
|
||||||
set -x # be verbose
|
set -x # be verbose
|
||||||
|
|
||||||
if [[ `pwd` == */test/cfg ]] ; then # we are in test/cfg
|
if [[ $(pwd) == */test/cfg ]] ; then # we are in test/cfg
|
||||||
CPPCHECK="../../cppcheck"
|
CPPCHECK="../../cppcheck"
|
||||||
DIR=""
|
DIR=""
|
||||||
else # assume we are in repo root
|
else # assume we are in repo root
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
if [[ "`./cppcheck --showtime=top5 cli/cmdlineparser.h --quiet | wc -l`" != 7 ]] ; then
|
if [[ "$(./cppcheck --showtime=top5 cli/cmdlineparser.h --quiet | wc -l)" != 7 ]] ; then
|
||||||
false
|
false
|
||||||
fi
|
fi
|
||||||
|
|
|
@ -1,3 +1,3 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
cat $1 | sed s@\"@\\\\\"@g | sed s@^@\"@ | sed s@\$@\\\\n\"@ | sed 's@\t@ @g'
|
sed s@\"@\\\\\"@g | sed s@^@\"@ $1 | sed s@\$@\\\\n\"@ | sed 's@\t@ @g'
|
||||||
|
|
|
@ -10,7 +10,7 @@
|
||||||
|
|
||||||
rm times-tags.txt
|
rm times-tags.txt
|
||||||
|
|
||||||
for i in `seq $1 $2`;
|
for i in $(seq $1 $2);
|
||||||
do
|
do
|
||||||
echo "1.$i"
|
echo "1.$i"
|
||||||
echo "1.$i" >> times-tags.txt
|
echo "1.$i" >> times-tags.txt
|
||||||
|
|
|
@ -15,12 +15,12 @@ make clean
|
||||||
|
|
||||||
git reset --hard HEAD > times.log
|
git reset --hard HEAD > times.log
|
||||||
|
|
||||||
for i in `seq 1 50`; do
|
for i in $(seq 1 50); do
|
||||||
git_head=`git log -1 --format=%h`
|
git_head=$(git log -1 --format=%h)
|
||||||
# if build fails, make clean and try again
|
# if build fails, make clean and try again
|
||||||
make SRCDIR=build CXXFLAGS=-O2 -j4 || make clean ; make SRCDIR=build CXXFLAGS=-O2 -j4
|
make SRCDIR=build CXXFLAGS=-O2 -j4 || make clean ; make SRCDIR=build CXXFLAGS=-O2 -j4
|
||||||
echo "Run number $i"
|
echo "Run number $i"
|
||||||
for j in `seq 1 ${iterations}`; do
|
for j in $(seq 1 ${iterations}); do
|
||||||
./cppcheck --quiet --showtime=summary --enable=all --inconclusive src 2> /dev/null | tee -a times.log
|
./cppcheck --quiet --showtime=summary --enable=all --inconclusive src 2> /dev/null | tee -a times.log
|
||||||
done
|
done
|
||||||
grep "Overall" times.log | tail -${iterations} | sed s/s// | awk -v "i=$i" -v "iterations=$iterations" -v "git_head=$git_head" '{ sum+=$3} END {print "Run " i", "git_head " Average: " sum/iterations}' | tee -a times.log
|
grep "Overall" times.log | tail -${iterations} | sed s/s// | awk -v "i=$i" -v "iterations=$iterations" -v "git_head=$git_head" '{ sum+=$3} END {print "Run " i", "git_head " Average: " sum/iterations}' | tee -a times.log
|
||||||
|
|
Loading…
Reference in New Issue