From 0628c5d81736027885954d09379fa8435e63ee50 Mon Sep 17 00:00:00 2001 From: Alex Vandiver Date: Thu, 30 Dec 2021 23:53:47 +0000 Subject: [PATCH] bootstrap-awscli: Set -eu, for if this is run standalone. The existing callsites of this are via `source` or being inline'd into the startup of a new host; in both of these cases, the surrounding script is already `set -eu`. However, if run as a standalone tool, it should also configure itself to catch checksum failures and other problems. --- tools/setup/bootstrap-awscli.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tools/setup/bootstrap-awscli.sh b/tools/setup/bootstrap-awscli.sh index 2564a88cd9..2ee3000350 100644 --- a/tools/setup/bootstrap-awscli.sh +++ b/tools/setup/bootstrap-awscli.sh @@ -1,5 +1,7 @@ # shellcheck shell=bash +set -eu + ARCH=$(uname -m) AWS_CLI_VERSION="2.4.7" @@ -14,7 +16,7 @@ fi if [ ! -d "/srv/zulip-aws-tools/v2/$AWS_CLI_VERSION" ]; then mkdir -p /srv/zulip-aws-tools - cd /srv/zulip-aws-tools || exit 1 + cd /srv/zulip-aws-tools rm -rf awscli.zip awscli.zip.sha256 aws/ curl -fL "https://awscli.amazonaws.com/awscli-exe-linux-$ARCH-$AWS_CLI_VERSION.zip" -o awscli.zip echo "$AWS_CLI_SHA awscli.zip" >awscli.zip.sha256