Skip to content

Commit

Permalink
creating default dirs in new bucket
Browse files Browse the repository at this point in the history
  • Loading branch information
charlie87041 committed Oct 23, 2023
1 parent 3428377 commit 64748c8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions script.sh
Original file line number Diff line number Diff line change
Expand Up @@ -36,14 +36,14 @@ generate_keys () {
populate_bucket () {
DIREXISTS=$(aws s3 ls s3://$BUCKET/templates/ 2>&1)
echo "direxists $DIREXISTS"
if [[ $DIREXISTS == '' ]] ; then
if [[ -z $DIREXISTS ]] ; then
aws s3api put-object --bucket $BUCKET --key templates/
echo 'created templates dir'
fi

DIREXISTS=$(aws s3 ls s3://$BUCKET/media/public/ 2>&1)

if [[ $DIREXISTS == '' ]] ; then
if [[ -z $DIREXISTS ]] ; then
aws s3api put-object --bucket $BUCKET --key media/public/
fi

Expand Down

0 comments on commit 64748c8

Please sign in to comment.