From ead5d73cde8656f48bd5478c07a8ddfb07abe884 Mon Sep 17 00:00:00 2001 From: Victor Laza Date: Fri, 17 Apr 2015 17:15:19 +0300 Subject: 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 --- jjb/opnfvdocs/build-docu.sh | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) (limited to 'jjb/opnfvdocs/build-docu.sh') 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 -- cgit 1.2.3-korg