From 635312fc2a8fe96aa282ed242279629f814b9333 Mon Sep 17 00:00:00 2001 From: rl1987 Date: Mon, 29 Oct 2018 10:45:14 +0200 Subject: [PATCH 1/3] Silence shellcheck SC2086 in run_trunnel.sh --- scripts/codegen/run_trunnel.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/codegen/run_trunnel.sh b/scripts/codegen/run_trunnel.sh index 428804342a..9df402cf59 100755 --- a/scripts/codegen/run_trunnel.sh +++ b/scripts/codegen/run_trunnel.sh @@ -10,7 +10,7 @@ OPTIONS="--require-version=1.5.1" # Get all .trunnel files recursively from that directory so we can support # multiple sub-directories. for file in `find ./src/trunnel/ -name '*.trunnel'`; do - python -m trunnel ${OPTIONS} $file + python -m trunnel ${OPTIONS} "$file" done python -m trunnel ${OPTIONS} --write-c-files --target-dir=./src/ext/trunnel/ From a0dd6bfdb03f53a52778e65161b9f3c68234bb82 Mon Sep 17 00:00:00 2001 From: rl1987 Date: Mon, 29 Oct 2018 10:54:31 +0200 Subject: [PATCH 2/3] run_trunnel.sh: Use 'find -exec' instead of a 'for' loop This fixes shellcheck warnings SC2044 and SC2006. --- scripts/codegen/run_trunnel.sh | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/scripts/codegen/run_trunnel.sh b/scripts/codegen/run_trunnel.sh index 9df402cf59..645b3c2158 100755 --- a/scripts/codegen/run_trunnel.sh +++ b/scripts/codegen/run_trunnel.sh @@ -9,9 +9,7 @@ OPTIONS="--require-version=1.5.1" # Get all .trunnel files recursively from that directory so we can support # multiple sub-directories. -for file in `find ./src/trunnel/ -name '*.trunnel'`; do - python -m trunnel ${OPTIONS} "$file" -done +find ./src/trunnel/ -name '*.trunnel' -exec python -m trunnel ${OPTIONS} {} \; python -m trunnel ${OPTIONS} --write-c-files --target-dir=./src/ext/trunnel/ From 4af27e016814f4817174ed87e7b660d65c6eaf9c Mon Sep 17 00:00:00 2001 From: rl1987 Date: Mon, 29 Oct 2018 11:05:55 +0200 Subject: [PATCH 3/3] Add changes file --- changes/ticket28010 | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 changes/ticket28010 diff --git a/changes/ticket28010 b/changes/ticket28010 new file mode 100644 index 0000000000..4fca17d022 --- /dev/null +++ b/changes/ticket28010 @@ -0,0 +1,3 @@ + o Code simplification and refactoring: + - Fix shellcheck warnings in run_trunnel.sh. Resolves issue + 28010.