From f8a09ce2610f0fa6674a84178402b3b8901bc970 Mon Sep 17 00:00:00 2001 From: Saverio Miroddi Date: Tue, 5 May 2020 23:11:26 +0200 Subject: [PATCH 1/3] Travis: Check all scripts, not only the installer --- .travis.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 4ffc106..2be84e4 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,3 +1,4 @@ +--- dist: bionic language: bash cache: @@ -10,4 +11,4 @@ script: > /dev/null || true" - sudo chmod +x /opt/shellcheck/shellcheck - "/opt/shellcheck/shellcheck --version" -- "/opt/shellcheck/shellcheck install-zfs.sh" +- "/opt/shellcheck/shellcheck $(grep -lzP '^#!/bin/\\w+sh' -r .)" From 0d6f69bbbd01042ef3aa20770036ed635b91f12e Mon Sep 17 00:00:00 2001 From: Saverio Miroddi Date: Tue, 5 May 2020 23:21:07 +0200 Subject: [PATCH 2/3] Shellcheck: Fix convert.sh --- demo/source/convert.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/demo/source/convert.sh b/demo/source/convert.sh index 59da24c..8e0b8e1 100755 --- a/demo/source/convert.sh +++ b/demo/source/convert.sh @@ -1,6 +1,6 @@ #!/bin/bash -source_dir=$(readlink -f $(dirname "$0")) +source_dir=$(readlink -f "$(dirname "$0")") demo_dir=$(dirname "$source_dir") (for f in "$source_dir"/*.webm; do echo "file '$f'"; done) | ffmpeg -f concat -safe 0 -i /dev/stdin -vf "fps=2,split[s0][s1];[s0]palettegen[p];[s1][p]paletteuse" "$demo_dir/demo.gif" -y From a490166adad7eb1803957ce46172aa23e0f0f12b Mon Sep 17 00:00:00 2001 From: Saverio Miroddi Date: Tue, 5 May 2020 23:27:15 +0200 Subject: [PATCH 3/3] Shellcheck: Add hint for two cases not requiring quotes --- install-zfs.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/install-zfs.sh b/install-zfs.sh index 6477d74..549eb2b 100755 --- a/install-zfs.sh +++ b/install-zfs.sh @@ -935,6 +935,8 @@ function create_pools { # # Stdin is ignored if the encryption is not set (and set via prompt). # + # shellcheck disable=SC2086 # quoting $v_pools_raid_type; barring invalid user input, the values are guaranteed not to + # need quoting. zpool create \ "${encryption_options[@]}" \ "${v_rpool_tweaks[@]}" \ @@ -944,6 +946,7 @@ function create_pools { # `-d` disable all the pool features (not used here); # + # shellcheck disable=SC2086 # see above zpool create \ "${v_bpool_tweaks[@]}" \ -O devices=off -O mountpoint=/boot -R "$c_zfs_mount_dir" -f \