diff --git a/.travis.yml b/.travis.yml index a854705..5772f7a 100644 --- a/.travis.yml +++ b/.travis.yml @@ -10,4 +10,4 @@ addons: - shellcheck script: - - bash -c 'shopt -s globstar; shellcheck **/*.sh easyrsa3/easyrsa' + - bash -c 'export SHELLCHECK_OPTS="-e SC2006"; shopt -s globstar; shellcheck **/*.sh easyrsa3/easyrsa' diff --git a/build/build-dist.sh b/build/build-dist.sh index eb56f29..7867f3e 100755 --- a/build/build-dist.sh +++ b/build/build-dist.sh @@ -1,4 +1,5 @@ #!/bin/sh +# shellcheck disable= # Easy-RSA 3 distribution packager: # creates ready-to-use tarball files for Unixes and a zip file for windows diff --git a/distro/windows/bin/easyrsa-shell-init.sh b/distro/windows/bin/easyrsa-shell-init.sh index 66568f6..76d03b7 100644 --- a/distro/windows/bin/easyrsa-shell-init.sh +++ b/distro/windows/bin/easyrsa-shell-init.sh @@ -24,7 +24,7 @@ for f in $extern_list; do echo " files." echo "" echo " Press enter to exit." - read x + read exit 1 fi done @@ -32,9 +32,9 @@ done # set_var is defined as any vars file needs it. # This is the same as in easyrsa, but we _don't_ export set_var() { - local var=$1 + var="$1" shift - local value="$*" + value="$*" eval "$var=\"\${$var-$value}\"" } #=> set_var() @@ -62,4 +62,4 @@ echo "" echo "Invoke './easyrsa' to call the program. Without commands, help is displayed." # Drop to a shell and await input -bin/sh \ No newline at end of file +bin/sh diff --git a/easyrsa3/easyrsa b/easyrsa3/easyrsa index d9986cb..5a305db 100755 --- a/easyrsa3/easyrsa +++ b/easyrsa3/easyrsa @@ -59,7 +59,8 @@ DIRECTORY STATUS (commands would take effect on these locations) # Detailed command help # When called with no args, calls usage(), otherwise shows help for a command cmd_help() { - text= opts= + text="" + opts="" case "$1" in init-pki|clean-all) text=" init-pki [ cmd-opts ]