From b80057d427867b81bc6e393abe0bf30ad5bc2705 Mon Sep 17 00:00:00 2001 From: AJ ONeal Date: Tue, 23 Nov 2021 08:55:42 +0000 Subject: [PATCH] bugfix(_example): vars should be quoted (and disable unexported vars warning) --- _example/install.sh | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/_example/install.sh b/_example/install.sh index cebf7a4..bd4a692 100644 --- a/_example/install.sh +++ b/_example/install.sh @@ -1,5 +1,8 @@ #!/bin/bash +# shellcheck disable=SC2034 +# "'pkg_cmd_name' appears unused. Verify it or export it." + function __init_foobar() { set -e set -u @@ -21,10 +24,10 @@ function __init_foobar() { # pkg_install must be defined by every package pkg_install() { # ~/.local/opt/foobar-v0.99.9/bin - mkdir -p "$(dirname $pkg_src_cmd)" + mkdir -p "$(dirname "${pkg_src_cmd}")" # mv ./foobar-*/foo ~/.local/opt/foobar-v0.99.9/bin/foo - mv ./foobar-*/foo "$pkg_src_cmd" + mv ./foobar-*/foo "${pkg_src_cmd}" } # pkg_get_current_version is recommended, but not required -- 2.25.1