3 export PATH=$PATH:/usr/local/bin/
6 while read -r -d ''; do
8 done < <(find . -type f -iname '*.rst' -print0)
10 for file in "${{files[@]}}"; do
12 file_cut="${{file%.*}}"
13 gs_cp_folder="$(echo "$file"| cut -d "/" -f2,3)"
15 html_file=$file_cut".html"
18 rst2html $file | gsutil cp -L gsoutput.txt - \
19 gs://artifacts.opnfv.org/"$project"/"$gs_cp_folder"/$(basename "$html_file")
20 gsutil setmeta -h "Content-Type:text/html" \
21 -h "Cache-Control:private, max-age=0, no-transform" \
22 gs://artifacts.opnfv.org/"$project"/"$gs_cp_folder"/$(basename "$html_file")
26 pdf_file="$file_cut"".pdf"
29 rst2pdf "$file" -o - | gsutil cp -L gsoutput.txt - \
30 gs://artifacts.opnfv.org/"$project"/"$gs_cp_folder"/$(basename "$pdf_file")
31 gsutil setmeta -h "Content-Type:application/pdf" \
32 -h "Cache-Control:private, max-age=0, no-transform" \
33 gs://artifacts.opnfv.org/"$project"/"$gs_cp_folder"/$(basename "$pdf_file")
40 while read -r -d ''; do
42 done < <(find * -type f \( -iname \*.jpg -o -iname \*.png \) -print0)
44 for img in "${{images[@]}}"; do
46 # uploading found images
48 cat "$img" | gsutil cp -L gsoutput.txt - \
49 gs://artifacts.opnfv.org/"$project"/"$img"
50 gsutil setmeta -h "Content-Type:image/jpeg" \
51 -h "Cache-Control:private, max-age=0, no-transform" \
52 gs://artifacts.opnfv.org/"$project"/"$img"