Skip to content

Commit c45477b

Browse files
committed
Clean up script
1 parent 7613ee6 commit c45477b

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

scripts/sync-large-static-images.sh

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,6 @@ upload_images() {
7373
echo "Uploading to: $S3_DEST"
7474
echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
7575

76-
# Capture exit code; show stdout+stderr live via tee to /dev/null trick
7776
set +e
7877
aws s3 sync --profile "${AWS_PROFILE}" "$SOURCE_DIR" "$S3_DEST" 2>&1
7978
EXIT_CODE=$?
@@ -149,8 +148,8 @@ while [[ $# -gt 0 ]]; do
149148
done
150149

151150
if [ "${UPLOAD_COMMAND}" == true ] && [ "${DOWNLOAD_COMMAND}" == true ]; then
152-
echo "Uploading and downloading must be done seperately. Exiting.";
153-
exit 0;
151+
echo "Uploading and downloading must be done separately. Exiting.";
152+
exit 1;
154153
elif [ "${UPLOAD_COMMAND}" == true ]; then
155154
upload_images "$ALL_BUCKETS";
156155
exit $?;

0 commit comments

Comments
 (0)