[Groonga-commit] groonga/groonga [master] [doc] change directory structure.

Back to archive index

null+****@clear***** null+****@clear*****
2011年 5月 20日 (金) 16:34:01 JST


Kouhei Sutou	2011-05-20 07:34:01 +0000 (Fri, 20 May 2011)

  New Revision: 9befe5854be226ac4ab1f9e33f52dc9f74c76bab

  Log:
    [doc] change directory structure.
    
    /docs/, /docs/ja/, ... -> /docs/, /ja/docs/, ...

  Modified files:
    Makefile.am
    tools/prepare-sphinx-html.rb

  Modified: Makefile.am (+8 -1)
===================================================================
--- Makefile.am    2011-05-20 07:20:33 +0000 (07bc119)
+++ Makefile.am    2011-05-20 07:34:01 +0000 (513929b)
@@ -87,4 +87,11 @@ update-document:
 	(cd doc && $(MAKE) install docdir=$(abs_srcdir)/tmp-doc/install)
 	ruby $(srcdir)/tools/prepare-sphinx-html.rb tmp-doc/install tmp-doc/dist
 	rm -rf $(GROONGA_GITHUB_COM_PATH)/docs
-	mv tmp-doc/dist $(GROONGA_GITHUB_COM_PATH)/docs
+	mv tmp-doc/dist/en $(GROONGA_GITHUB_COM_PATH)/docs
+	for locale in `cd tmp-doc/dist; echo *`; do		\
+	  dest_base_dir=$(GROONGA_GITHUB_COM_PATH)/$${locale};	\
+	  mkdir -p $${dest_base_dir};				\
+	  dest_dir=$${dest_base_dir}/docs;			\
+	  rm -rf $${dest_dir};					\
+	  mv tmp-doc/dist/$${locale} $${dest_dir};		\
+	done

  Modified: tools/prepare-sphinx-html.rb (+7 -6)
===================================================================
--- tools/prepare-sphinx-html.rb    2011-05-20 07:20:33 +0000 (d02fc38)
+++ tools/prepare-sphinx-html.rb    2011-05-20 07:34:01 +0000 (9a61322)
@@ -40,11 +40,7 @@ end
 
 locale_dirs.each do |locale_dir|
   locale_source_dir = source_dir + locale_dir + "html"
-  if locale_dir.to_s == "en"
-    locale_dest_dir = dest_dir
-  else
-    locale_dest_dir = dest_dir + locale_dir
-  end
+  locale_dest_dir = dest_dir + locale_dir
   locale_source_dir.find do |source_path|
     relative_path = source_path.relative_path_from(locale_source_dir)
     dest_path = locale_dest_dir + relative_path
@@ -60,7 +56,12 @@ locale_dirs.each do |locale_dir|
         end
         FileUtils.touch(dest_path, :mtime => source_path.mtime)
       else
-        FileUtils.cp(source_path, dest_path, :preserve => true)
+        case source_path.basename.to_s
+        when ".buildinfo"
+          # ignore
+        else
+          FileUtils.cp(source_path, dest_path, :preserve => true)
+        end
       end
     end
   end




Groonga-commit メーリングリストの案内
Back to archive index