diff options
| -rwxr-xr-x | scripts/01-create-bucket.sh | 10 | 
1 files changed, 9 insertions, 1 deletions
| diff --git a/scripts/01-create-bucket.sh b/scripts/01-create-bucket.sh index fb853c9..364e098 100755 --- a/scripts/01-create-bucket.sh +++ b/scripts/01-create-bucket.sh @@ -1,6 +1,14 @@  #!/bin/sh -read -p "Enter 'order_products.csv' path: " path +path=$(find . -name 'order_products.csv' -print -quit) + +if [ -z "$path" ]; then +    read -p "Enter 'order_products.csv' path: " path +    if [ -z "$path" ] || [ ! -e "$path" ]; then +        echo ">>>> Path not found..." +        exit 1 +    fi +fi  gcloud storage buckets create gs://$BUCKET_NAME --location=eu  gcloud storage buckets add-iam-policy-binding gs://${BUCKET_NAME} \ | 
