From 4974544f5546eec6d0b6245bac8badfe4bf743e4 Mon Sep 17 00:00:00 2001 From: Alex Thewsey Date: Tue, 8 Aug 2023 01:25:04 +0000 Subject: [PATCH] fix(deps): Abort script on error Allows us to remove some '&&' chaining while keeping well-defined behaviour --- download-dependencies.sh | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/download-dependencies.sh b/download-dependencies.sh index d449ad7a..d71d3f9d 100755 --- a/download-dependencies.sh +++ b/download-dependencies.sh @@ -1,12 +1,13 @@ #!/bin/sh -echo "Creating directory" -mkdir -p ./dependencies && \ +set -e + +echo "(Re)-creating directory" +rm -rf ./dependencies +mkdir ./dependencies cd ./dependencies -# Removing prior dependencies -rm -rf * echo "Downloading dependencies" -curl -sS https://d2eo22ngex1n9g.cloudfront.net/Documentation/SDK/bedrock-python-sdk.zip > sdk.zip && \ +curl -sS https://d2eo22ngex1n9g.cloudfront.net/Documentation/SDK/bedrock-python-sdk.zip > sdk.zip echo "Unpacking dependencies" # (SageMaker Studio system terminals don't have `unzip` utility installed) if command -v unzip &> /dev/null