[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-commits] [tor/master] Fix shellcheck warnings in fixup_filenames.sh



commit 55b4f02ba6cbbd4cae942a9e84e48e237d8e38aa
Author: rl1987 <rl1987@xxxxxxxxxxxxxxxx>
Date:   Mon Apr 15 12:13:35 2019 +0300

    Fix shellcheck warnings in fixup_filenames.sh
---
 changes/ticket30078              | 3 +++
 src/test/fuzz/fixup_filenames.sh | 6 +++---
 2 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/changes/ticket30078 b/changes/ticket30078
new file mode 100644
index 000000000..5ab5abdbf
--- /dev/null
+++ b/changes/ticket30078
@@ -0,0 +1,3 @@
+  o Code simplification and refactoring (shell scripts):
+    - Fix shellcheck warnings in src/test/fuzz/fixup_filenames.sh. Resolves
+      issue 30078.
diff --git a/src/test/fuzz/fixup_filenames.sh b/src/test/fuzz/fixup_filenames.sh
index 68efc1abc..f730d532a 100755
--- a/src/test/fuzz/fixup_filenames.sh
+++ b/src/test/fuzz/fixup_filenames.sh
@@ -8,9 +8,9 @@ if [ ! -d "$1" ] ; then
 fi
 
 for fn in "$1"/* ; do
-    prev=`basename "$fn"`
-    post=`sha256sum "$fn" | sed -e 's/ .*//;'`
-    if [ "$prev" == "$post" ] ; then
+    prev=$(basename "$fn")
+    post=$(sha256sum "$fn" | sed -e 's/ .*//;')
+    if [ "$prev" = "$post" ] ; then
       echo "OK $prev"
     else
       echo "mv $prev $post"



_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits