Fixed stdin for image upload in build-upload-docu.sh
[releng.git] / jjb / opnfvdocs / build-upload-docu.sh
index 23e7838..c4c7811 100644 (file)
@@ -40,17 +40,16 @@ for file in "${{files[@]}}"; do
 
 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"
+        echo "$img" | gsutil cp -L gsoutput.txt - \
         gs://artifacts.opnfv.org/"$project"/"$img"
         gsutil setmeta -h "Content-Type:text/html" \
                         -h "Cache-Control:private, max-age=0, no-transform" \