From d1f05364769d7eb63c4ee5c85dc11892e0f071eb Mon Sep 17 00:00:00 2001 From: Andreas Jaeger Date: Fri, 1 May 2015 13:00:30 +0200 Subject: [PATCH] Copy RST files to ha-guide and api-site Copy glossary.rst and app_support.rst to ha-guide and firstApp. Change-Id: I265d3c7d0203af2ba4f6b0442f65be7a03f0bd2d Depends-On: I7c40ccb80d77e7a6fd763b778945ee0869b7e1c0 Depends-On: If4e11a4f90d580876865348e0d88b92cec4b6659 --- projects.txt | 1 + tools/sync-projects.sh | 53 ++++++++++++++++++++++++++++-------------- 2 files changed, 37 insertions(+), 17 deletions(-) diff --git a/projects.txt b/projects.txt index 15f335a07e..268a8bf7e9 100644 --- a/projects.txt +++ b/projects.txt @@ -1,3 +1,4 @@ +openstack/api-site openstack/ha-guide openstack/operations-guide openstack/security-doc diff --git a/tools/sync-projects.sh b/tools/sync-projects.sh index 6894b4cc5a..90a5887cb8 100755 --- a/tools/sync-projects.sh +++ b/tools/sync-projects.sh @@ -19,8 +19,24 @@ if [ -z "$PROJECT_DIR" ] ; then exit 1 fi +function copy_rst { + target=$1 + # Copy over some RST files + mkdir -p $target + tools/glossary2rst.py $PROJECT_DIR/$target + + for filename in doc/users-guides/source/common/app_support.rst; do + cp $filename $PROJECT_DIR/$target + done + (cd $PROJECT_DIR; git add $target) +} + case "$PROJECT_DIR" in + api-site) + copy_rst firstapp/source/imported/ + ;; ha-guide) + copy_rst doc/ha-guide/source/imported GLOSSARY_SUB_DIR="doc/glossary" ENT_DIR="high-availability-guide" CHECK_MARK_DIR="figures" @@ -40,23 +56,26 @@ case "$PROJECT_DIR" in exit 1 ;; esac -GLOSSARY_DIR="$PROJECT_DIR/$GLOSSARY_SUB_DIR" -cp doc/glossary/glossary-terms.xml $GLOSSARY_DIR/ -# Copy only Japanese and zh_CN translations since ha-guide, -# security-guide, and operations-guide are only translated to Japanese -# currently while the ha-guide is additionally translated to zh_CN. -# Training-guides is not translated at all. -cp doc/glossary/locale/{ja,zh_CN}.po $GLOSSARY_DIR/locale/ -sed -i -e "s|\"../common/entities/openstack.ent\"|\"../$ENT_DIR/openstack.ent\"|" \ - $GLOSSARY_DIR/glossary-terms.xml -(cd $PROJECT_DIR;git add $GLOSSARY_SUB_DIR) +if [[ "$PROJECT" != "api-site" ]] ; then + GLOSSARY_DIR="$PROJECT_DIR/$GLOSSARY_SUB_DIR" -# Sync entitites file -cp doc/common/entities/openstack.ent $GLOSSARY_DIR/../$ENT_DIR/ -sed -i -e "s|imagedata fileref=\"../common/figures|imagedata fileref=\"$CHECK_MARK_DIR|" \ - $GLOSSARY_DIR/../$ENT_DIR/openstack.ent + cp doc/glossary/glossary-terms.xml $GLOSSARY_DIR/ + # Copy only Japanese and zh_CN translations since ha-guide, + # security-guide, and operations-guide are only translated to Japanese + # currently while the ha-guide is additionally translated to zh_CN. + # Training-guides is not translated at all. + cp doc/glossary/locale/{ja,zh_CN}.po $GLOSSARY_DIR/locale/ + sed -i -e "s|\"../common/entities/openstack.ent\"|\"../$ENT_DIR/openstack.ent\"|" \ + $GLOSSARY_DIR/glossary-terms.xml + (cd $PROJECT_DIR; git add $GLOSSARY_SUB_DIR) -# Add files -(cd $PROJECT_DIR;git add $GLOSSARY_SUB_DIR \ - $GLOSSARY_SUB_DIR/../$ENT_DIR/openstack.ent) + # Sync entitites file + cp doc/common/entities/openstack.ent $GLOSSARY_DIR/../$ENT_DIR/ + sed -i -e "s|imagedata fileref=\"../common/figures|imagedata fileref=\"$CHECK_MARK_DIR|" \ + $GLOSSARY_DIR/../$ENT_DIR/openstack.ent + + # Add files + (cd $PROJECT_DIR; git add $GLOSSARY_SUB_DIR \ + $GLOSSARY_SUB_DIR/../$ENT_DIR/openstack.ent) +fi