From aabbb2ad101820d8b0a1b8a1677aee3480516d65 Mon Sep 17 00:00:00 2001 From: Alex Vandiver Date: Thu, 23 Jun 2022 19:30:54 +0000 Subject: [PATCH] bootstrap-awscli: Leave CWD unchanged. --- tools/setup/bootstrap-awscli.sh | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/tools/setup/bootstrap-awscli.sh b/tools/setup/bootstrap-awscli.sh index b121b84f8c..24bb9742b0 100644 --- a/tools/setup/bootstrap-awscli.sh +++ b/tools/setup/bootstrap-awscli.sh @@ -16,13 +16,14 @@ fi if [ ! -d "/srv/zulip-aws-tools/v2/$AWS_CLI_VERSION" ]; then mkdir -p /srv/zulip-aws-tools - 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 - sha256sum -c awscli.zip.sha256 - unzip -q awscli.zip ( + cd /srv/zulip-aws-tools || exit 1 + 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 + sha256sum -c awscli.zip.sha256 + unzip -q awscli.zip + cd ./aws || exit 1 ./install -i /srv/zulip-aws-tools -b /srv/zulip-aws-tools/bin -u )