Browse code

if the subdirectory does not exist, create it in all directories under translation/projects/website

Runa A. Sandvik authored on04/09/2009 13:08:27
Showing1 changed files
... ...
@@ -118,14 +118,21 @@ for file in $wml ; do
118 118
 	then
119 119
 		popath="$podir"
120 120
 	else
121
-		popath="$podir/$onedirup"
121
+		# We need to know if a subdirectory, such as torbutton,
122
+		# exist in the translation module. If it does not exist,
123
+		# the script will create it in all the directories under
124
+		# translation/projects/website (excluding .svn)
125
+		langdir=`find $(dirname "$podir") -maxdepth 1 -type d ! -path $(dirname "$podir") ! -path "*\.*"`
126
+
127
+		for dir in $langdir ; do
128
+			if [ ! -d "$dir/$onedirup" ]
129
+			then
130
+				svn mkdir "$dir/$onedirup"
131
+			fi
132
+		done
122 133
 
123
-		# Check if the directory exists. If it doesn't,
124
-		# create it
125
-		if [ ! -d "$podir/$onedirup" ]
126
-		then
127
-			svn mkdir "$podir/$onedirup"
128
-		fi
134
+		# Set the path
135
+		popath="$podir/$onedirup"
129 136
 	fi
130 137
 		
131 138
 	# Check to see if the pot file existed prior to running this