summaryrefslogtreecommitdiffstats
path: root/jjb/opnfvdocs
diff options
context:
space:
mode:
authorVictor Laza <vlaza@cloudbasesolutions.com>2015-04-17 17:15:19 +0300
committerVictor Laza <vlaza@cloudbasesolutions.com>2015-04-17 17:30:53 +0300
commitead5d73cde8656f48bd5478c07a8ddfb07abe884 (patch)
tree3178848978370c243cd721ae3f2744fa1f6d5142 /jjb/opnfvdocs
parent383efb72e002c54b13212ec5d03109e86597fed6 (diff)
Update [1] on build-docu.sh for opnfvdocs project
JIRA: Done to avoid "bad substitution" in ${dirname "${file}"} Change-Id: I30ee87e6bc526e6baf3f4008ff90a7d1673d70a2 Signed-off-by: Victor Laza <vlaza@cloudbasesolutions.com>
Diffstat (limited to 'jjb/opnfvdocs')
-rw-r--r--jjb/opnfvdocs/build-docu.sh14
1 files changed, 5 insertions, 9 deletions
diff --git a/jjb/opnfvdocs/build-docu.sh b/jjb/opnfvdocs/build-docu.sh
index 64ddf7de5..2abf1275a 100644
--- a/jjb/opnfvdocs/build-docu.sh
+++ b/jjb/opnfvdocs/build-docu.sh
@@ -10,26 +10,22 @@ done < <(find . -type f -iname '*.rst' -print0)
for file in "${{files[@]}}"; do
file_cut="${{file%.*}}"
- gs_cp_folder="${{dirname "${{file}}"}}"
-
- html_file=$file_cut".html"
+ gs_cp_folder="${{file_cut}}"
echo "rst2html $file"
rst2html $file | gsutil cp -L gsoutput.txt - \
- gs://artifacts.opnfv.org/"$project"/"$gs_cp_folder"/$(basename "$html_file")
+ gs://artifacts.opnfv.org/"$project"/"$gs_cp_folder".html
gsutil setmeta -h "Content-Type:text/html" \
-h "Cache-Control:private, max-age=0, no-transform" \
- gs://artifacts.opnfv.org/"$project"/"$gs_cp_folder"/$(basename "$html_file")
+ gs://artifacts.opnfv.org/"$project"/"$gs_cp_folder".html
cat gsoutput.txt
- pdf_file="$file_cut"".pdf"
-
echo "rst2pdf $file"
rst2pdf "$file" -o - | gsutil cp -L gsoutput.txt - \
- gs://artifacts.opnfv.org/"$project"/"$gs_cp_folder"/$(basename "$pdf_file")
+ gs://artifacts.opnfv.org/"$project"/"$gs_cp_folder".html
gsutil setmeta -h "Content-Type:application/pdf" \
-h "Cache-Control:private, max-age=0, no-transform" \
- gs://artifacts.opnfv.org/"$project"/"$gs_cp_folder"/$(basename "$pdf_file")
+ gs://artifacts.opnfv.org/"$project"/"$gs_cp_folder".pdf
cat gsoutput.txt
done