[mapserver-commits] r9730 - branches/branch-5-6/docs

svn at osgeo.org svn at osgeo.org
Fri Jan 22 08:42:06 EST 2010


Author: aboudreault
Date: 2010-01-22 08:42:04 -0500 (Fri, 22 Jan 2010)
New Revision: 9730

Modified:
   branches/branch-5-6/docs/Makefile
Log:
Modified the init rule to support ROBOTS NOINDEX

Modified: branches/branch-5-6/docs/Makefile
===================================================================
--- branches/branch-5-6/docs/Makefile	2010-01-22 02:21:52 UTC (rev 9729)
+++ branches/branch-5-6/docs/Makefile	2010-01-22 13:42:04 UTC (rev 9730)
@@ -43,7 +43,19 @@
 init:
 	@for lang in $(TRANSLATIONS) ;\
 	do \
-		yes n | cp -ipR en/* $$lang &> /dev/null;\
+# 		We change the Internal Field Separator (IFS) because to handle filename with special char like space. \
+		OLDIFS="$$IFS"; \
+		IFS=$$'\n'; \
+		for file in `cd en; find . -type f -a -regex '.*\.txt$$' -a -not -regex '.*\.svn.*' -printf "%p\n" ; cd ..;`; \
+		do \
+			if [ ! -f $$lang/$$file ]; then  \
+				mkdir -p `dirname "$$lang/$$file"`; \
+				(echo ".. meta::"; echo "  :ROBOTS: NOINDEX") | cat - "en/$$file" > "$$lang/$$file"; \
+			fi \
+		done; \
+		IFS=$$OLDIFS; \
+#		Copy all no .txt files \
+		yes n | cp -ipR en/* $$lang &> /dev/null; \
 	done
 	@echo "Init finished. Other target can now be build.";\
 



More information about the mapserver-commits mailing list