Silence shellcheck warnings (#279)

* SC1091: the `config` file might not be present, which is normal.
* SC2086: Double quote to prevent globbing and word splitting.

Tested clean output using: `find -name "*.sh" -exec shellcheck -x {} \;`
This commit is contained in:
Hugo Hromic 2019-04-25 10:11:57 +01:00 committed by XECDesign
parent 042f769edb
commit 407663a57f
2 changed files with 3 additions and 2 deletions

View File

@ -15,6 +15,7 @@ fi
set -e set -e
if [ -f config ]; then if [ -f config ]; then
# shellcheck disable=SC1091
source config source config
fi fi

View File

@ -203,8 +203,8 @@ if [[ ! "$FIRST_USER_NAME" =~ ^[a-z][-a-z0-9_]*$ ]]; then
exit 1 exit 1
fi fi
if [[ -n "${APT_PROXY}" ]] && ! curl --silent ${APT_PROXY} >/dev/null ; then if [[ -n "${APT_PROXY}" ]] && ! curl --silent "${APT_PROXY}" >/dev/null ; then
echo "Could not reach APT_PROXY server:" ${APT_PROXY} echo "Could not reach APT_PROXY server: ${APT_PROXY}"
exit 1 exit 1
fi fi