Fix ShellCheck warnings for signing script 68/11768/4
authorAndrew Grimberg <agrimberg@linuxfoundation.org>
Thu, 12 Jul 2018 22:44:25 +0000 (15:44 -0700)
committerAndrew Grimberg <agrimberg@linuxfoundation.org>
Thu, 12 Jul 2018 23:26:36 +0000 (16:26 -0700)
In prepration for adding sigul signing, the shellcheck warnings need to
be cleaned up

Change-Id: I27479a28f2a7898e489c8a2198ffbf8cdea0cbef
Signed-off-by: Andrew Grimberg <agrimberg@linuxfoundation.org>
shell/sign

index 84a6fc8..711f605 100755 (executable)
@@ -73,13 +73,15 @@ sign_dir() {
 
     if hash parallel 2>/dev/null; then
         echo "Signing in parallel..."
+        # We need to wordsplit ${files_to_sign[*]} so disable quoting check
+        # shellcheck disable=SC2086
         parallel --no-notice --jobs 200% --halt now,fail=1 \
             "$GPG_BIN --batch -abq {}" ::: ${files_to_sign[*]}
 
         echo "Signed the following files:"
         printf '%s\n' "${files_to_sign[@]}"
     else
-        echo "GNU `parallel` not found. Signing in serial mode..."
+        echo "GNU parallel not found. Signing in serial mode..."
         for f in "${files_to_sign[@]}"; do
             echo "Signing $f"
             "$GPG_BIN" --batch -abq "$f"