[mapserver-commits] r9731 - trunk/docs

svn at osgeo.org svn at osgeo.org
Fri Jan 22 08:45:57 EST 2010


Author: aboudreault
Date: 2010-01-22 08:45:57 -0500 (Fri, 22 Jan 2010)
New Revision: 9731

Modified:
   trunk/docs/Makefile
Log:
Sync trunk: modifiedthe init rule to support ROBOTS NOINDEX 

Modified: trunk/docs/Makefile
===================================================================
--- trunk/docs/Makefile	2010-01-22 13:42:04 UTC (rev 9730)
+++ trunk/docs/Makefile	2010-01-22 13:45:57 UTC (rev 9731)
@@ -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