Improve and fix bash script

This commit is contained in:
Haralan Dobrev 2022-08-13 17:09:29 +03:00
parent 5e89769152
commit 3828a9a333
1 changed files with 3 additions and 3 deletions

View File

@ -3,10 +3,10 @@
set -euxo pipefail
insecure_option=""
if ["$MINIO_INSECURE" == "true"]; then
if [[ "$MINIO_INSECURE" == "true" ]]; then
insecure_option="--insecure"
fi
mc alias set $insecure_option deploy $MINIO_ENDPOINT $MINIO_ACCESS_KEY $MINIO_SECRET_KEY
mc alias set "$insecure_option" deploy "$MINIO_ENDPOINT" "$MINIO_ACCESS_KEY" "$MINIO_SECRET_KEY"
mc mirror --overwrite $insecure_option $1 "deploy/$2"
mc mirror --overwrite "$insecure_option" $1 "deploy/$2"