[or-cvs] r20477: {website} if the subdirectory does not exist, create it in all directo (website/trunk)

runa at seul.org runa at seul.org
Fri Sep 4 11:08:28 UTC 2009


Author: runa
Date: 2009-09-04 07:08:27 -0400 (Fri, 04 Sep 2009)
New Revision: 20477

Modified:
   website/trunk/wml2po.sh
Log:
if the subdirectory does not exist, create it in all directories under translation/projects/website

Modified: website/trunk/wml2po.sh
===================================================================
--- website/trunk/wml2po.sh	2009-09-04 08:19:20 UTC (rev 20476)
+++ website/trunk/wml2po.sh	2009-09-04 11:08:27 UTC (rev 20477)
@@ -118,14 +118,21 @@
 	then
 		popath="$podir"
 	else
+		# We need to know if a subdirectory, such as torbutton,
+		# exist in the translation module. If it does not exist,
+		# the script will create it in all the directories under
+		# translation/projects/website (excluding .svn)
+		langdir=`find $(dirname "$podir") -maxdepth 1 -type d ! -path $(dirname "$podir") ! -path "*\.*"`
+
+		for dir in $langdir ; do
+			if [ ! -d "$dir/$onedirup" ]
+			then
+				svn mkdir "$dir/$onedirup"
+			fi
+		done
+
+		# Set the path
 		popath="$podir/$onedirup"
-
-		# Check if the directory exists. If it doesn't,
-		# create it
-		if [ ! -d "$podir/$onedirup" ]
-		then
-			svn mkdir "$podir/$onedirup"
-		fi
 	fi
 		
 	# Check to see if the pot file existed prior to running this



More information about the tor-commits mailing list