We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 303b791 commit bd9bc6fCopy full SHA for bd9bc6f
1 file changed
rootfs/bin/create_bucket
@@ -8,18 +8,5 @@ mc config host add storage \
8
"${DRYCC_STORAGE_SECRETKEY}" \
9
--lookup "${DRYCC_STORAGE_LOOKUP}" \
10
--api s3v4
11
-
12
-has_bucket(){
13
- mc ls storage -json|jq -r '.key'|grep -w "${DRYCC_STORAGE_BUCKET}"
14
-}
15
16
mc ping storage -x
17
18
-if [ -z "$(has_bucket)" ] ;then
19
- mc mb storage/"${DRYCC_STORAGE_BUCKET}"
20
- if [ -z "$(has_bucket)" ] ;then
21
- echo "create bucket ${DRYCC_STORAGE_BUCKET} error"
22
- exit 1
23
- fi
24
-fi
25
-echo "create bucket ${DRYCC_STORAGE_BUCKET} success"
+mc mb --ignore-existing storage/"${DRYCC_STORAGE_BUCKET}"
0 commit comments