]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
Fix shellcheck issues in cov-diff - SC2231, SC2006 and SC2086
authorrl1987 <rl1987@sdf.lonestar.org>
Sun, 11 Nov 2018 17:18:49 +0000 (19:18 +0200)
committerGeorge Kadianakis <desnacked@riseup.net>
Thu, 15 Nov 2018 17:37:07 +0000 (19:37 +0200)
changes/ticket28009 [new file with mode: 0644]
scripts/test/cov-diff

diff --git a/changes/ticket28009 b/changes/ticket28009
new file mode 100644 (file)
index 0000000..1d986d4
--- /dev/null
@@ -0,0 +1,3 @@
+  o Code simplification and refactoring:
+    - Fix shellcheck warnings in cov-diff script. Resolves issue
+      28009.
index 6179dff63e739dc6a9118abcb2f179e3718cf73e..f3ca856888b2862455c5eba6e0e082a0886c6ffc 100755 (executable)
@@ -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"