[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[tor-commits] [tor/master] Fix shellcheck issues in cov-diff - SC2231, SC2006 and SC2086
commit d9f7cb3f6202291d38d611165f70e0c1c33b3e92
Author: rl1987 <rl1987@xxxxxxxxxxxxxxxx>
Date: Sun Nov 11 19:18:49 2018 +0200
Fix shellcheck issues in cov-diff - SC2231, SC2006 and SC2086
---
changes/ticket28009 | 3 +++
scripts/test/cov-diff | 6 +++---
2 files changed, 6 insertions(+), 3 deletions(-)
diff --git a/changes/ticket28009 b/changes/ticket28009
new file mode 100644
index 000000000..1d986d421
--- /dev/null
+++ b/changes/ticket28009
@@ -0,0 +1,3 @@
+ o Code simplification and refactoring:
+ - Fix shellcheck warnings in cov-diff script. Resolves issue
+ 28009.
diff --git a/scripts/test/cov-diff b/scripts/test/cov-diff
index 6179dff63..f3ca85688 100755
--- a/scripts/test/cov-diff
+++ b/scripts/test/cov-diff
@@ -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"
_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits