Created
May 9, 2021 13:15
-
-
Save ValentaTomas/ea63c4df4f7645add22f2687e86d35a8 to your computer and use it in GitHub Desktop.
Upload files in a directory to GCP bucket without caching
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
DIR=$1 | |
export BUCKET=$2 | |
cd $DIR | |
ls -l ./ | tr -s ' ' | cut -d' ' -f9 | | |
tr ' ' '\n' | | |
xargs -n 1 -I{} gsutil -h "Cache-Control:no-cache, max-age=0" cp {} gs://$BUCKET |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment