From 57f892eb5089c838152668bd99a81b333d31666a Mon Sep 17 00:00:00 2001 From: Eric Swanson <64809312+ericswanson-dfinity@users.noreply.github.com> Date: Tue, 5 Dec 2023 16:38:17 -0800 Subject: [PATCH] fix: shellcheck warnings (#3468) --- public/install/999_footer.sh | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/public/install/999_footer.sh b/public/install/999_footer.sh index 71b327af74..fac58f8df4 100644 --- a/public/install/999_footer.sh +++ b/public/install/999_footer.sh @@ -24,7 +24,7 @@ download_and_install() { ensure downloader "$_sha256_url" "${_sha256_filename}" log "Checking integrity of tarball..." - ensure $SHASUM -c "${_sha256_filename}" + ensure "$SHASUM" -c "${_sha256_filename}" ensure tar -xzf "${_tarball_filename}" ensure cd "${_archive}" >/dev/null @@ -73,10 +73,9 @@ main() { need_cmd touch local _dir - _dir="$(mktemp -d 2>/dev/null)" - if [ $? -ne 0 ]; then - _dir="$(mktemp -d -t dfinity-dfxvm)" - if [ $? -ne 0 ]; then + + if ! _dir="$(mktemp -d 2>/dev/null)"; then + if ! _dir="$(mktemp -d -t dfinity-dfxvm)"; then err "failed to create temporary directory" fi fi