#!/bin/bash
+set -e
+set -o pipefail
+
project="opnfvdocs"
export PATH=$PATH:/usr/local/bin/
done
-
images=()
-
while read -r -d ''; do
- files+=("$REPLY")
+ images+=("$REPLY")
done < <(find * -type f \( -iname \*.jpg -o -iname \*.png \) -print0)
for img in "${{images[@]}}"; do
# uploading found images
echo "uploading $img"
+ cat "$img" | gsutil cp -L gsoutput.txt - \
gs://artifacts.opnfv.org/"$project"/"$img"
- gsutil setmeta -h "Content-Type:text/html" \
+ gsutil setmeta -h "Content-Type:image/jpeg" \
-h "Cache-Control:private, max-age=0, no-transform" \
gs://artifacts.opnfv.org/"$project"/"$img"
cat gsoutput.txt