Fix docu_build.sh for doctor and promise 05/1405/3
authorRyota MIBU <r-mibu@cq.jp.nec.com>
Mon, 7 Sep 2015 10:31:13 +0000 (19:31 +0900)
committerFatih Degirmenci <fatih.degirmenci@ericsson.com>
Tue, 8 Sep 2015 07:31:53 +0000 (07:31 +0000)
JIRA: RELENG-29

Change-Id: Ia9b2f1ac3f420cd3d8e0be0addda8fe7802a982e
Signed-off-by: Ryota MIBU <r-mibu@cq.jp.nec.com>
jjb/doctor/docu-build.sh

index ffb1311..2a253b5 100644 (file)
@@ -33,9 +33,15 @@ if [[ $JOB_NAME =~ "verify" ]] ; then
     echo
     echo "Document is available at http://$gs_path_review"
 else
-    gsutil cp -r build/design_docs "gs://$gs_path_branch/"
-    gsutil cp -r build/requirements/html "gs://$gs_path_branch/"
-    gsutil cp -r build/requirements/latex/*.pdf "gs://$gs_path_branch/"
+    if [ -e build/design_docs ]; then
+        gsutil cp -r build/design_docs "gs://$gs_path_branch/"
+    fi
+    if [ -e build/requirements/html ]; then
+        gsutil cp -r build/requirements/html "gs://$gs_path_branch/"
+    fi
+    if [ -e build/requirements/latex ]; then
+        gsutil cp -r build/requirements/latex/*.pdf "gs://$gs_path_branch/"
+    fi
     echo
     echo "Latest document is available at http://$gs_path_branch"