[Debian-l10n-commits] r1099 - /dl10n/trunk/pootle/sync-projects.d/10debconf

bubulle at users.alioth.debian.org bubulle at users.alioth.debian.org
Fri Jul 25 13:38:42 UTC 2008


Author: bubulle
Date: Fri Jul 25 13:38:41 2008
New Revision: 1099

URL: http://svn.debian.org/wsvn/?sc=1&rev=1099
Log:
Cosmetic changes

Modified:
    dl10n/trunk/pootle/sync-projects.d/10debconf

Modified: dl10n/trunk/pootle/sync-projects.d/10debconf
URL: http://svn.debian.org/wsvn/dl10n/trunk/pootle/sync-projects.d/10debconf?rev=1099&op=diff
==============================================================================
--- dl10n/trunk/pootle/sync-projects.d/10debconf (original)
+++ dl10n/trunk/pootle/sync-projects.d/10debconf Fri Jul 25 13:38:41 2008
@@ -2,7 +2,7 @@
 
 . `dirname $0`/cfg/`basename $0`
 
-echo "Updating debconf translations:"
+echo "`basename $0`: Updating debconf translations..."
 
 TEMPDIR=`tempfile --directory=/tmp`
 rm $TEMPDIR
@@ -14,7 +14,7 @@
 [ -f $TARBALL ] || exit 1
 
 # First we extract the tarball in the temporary directory
-echo "  Extract files gathered from the archive"
+echo "  Extracting files from $TARBALL..."
 mkdir $TEMPDIR
 cd $TEMPDIR
 umask 002
@@ -23,11 +23,10 @@
 rm -rf po
 
 # Then we extract the PO Files
-echo "  Uncompress/update/check extracted files:"
+echo "  Uncompress/update/check extracted files..."
 for pkg in `find . -mindepth 3 -maxdepth 3 -type d` ; do
-#	echo -n "."
-        # Files are originall in debian/po. Move them the the root
-        # of the directory
+	# Files are originall in debian/po. Move them the the root
+	# of the directory
 	mv $pkg/debian/po/*gz $pkg 2>/dev/null
 	# And clean out the remaining stuff
 	rm -rf $pkg/debian 2>/dev/null
@@ -59,7 +58,6 @@
 	done
 	# Now we have a directory withe only $LANGUAGE.po and templates.pot
 	TEMPFILE=`tempfile`
-#	echo "    Updating $PROJECTDIR/$pkg"
 	# Now we update the file in Pootle
 	# We need to merge the file from the tarball with
 	# the file in Pootle (that one could have been changed by a translator
@@ -98,17 +96,21 @@
 # Let's do some cleaning'
 
 # When there are known broken files, let's clean them
-echo "  Cleaning out broken files"
+echo "  Cleaning out broken files..."
+for file in $BROKEN; do
+	echo "    $file"
+	rm $PROJECTDIR/$file
+done
 
 # Some packages should be ignored for various reasons
-echo "  Cleaning out ignored packages"
+echo "  Cleaning out ignored packages..."
 for pkg in $IGNORE; do
- echo "    $pkg"
- rm -rf `find $PROJECTDIR -mindepth 3 -maxdepth 3 -name $pkg` #2>/dev/null
+	echo "    $pkg"
+	rm -rf `find $PROJECTDIR -mindepth 3 -maxdepth 3 -name $pkg` #2>/dev/null
 done
 
 # And some packages provide useless garbage 
-echo "  Cleaning out garbage"
+echo "  Cleaning out garbage..."
 for dir in $GARBAGE; do
 	echo "    $dir"
 	rm -rf $PROJECTDIR/$dir
@@ -122,9 +124,8 @@
 # Now we fill in all packages directories with one file per language
 # That's slightly suboptimal but this is the only way to have correct
 # statistics in Pootle
-echo "  Updating Pootle files:"
+echo "  Updating Pootle files..."
 for pkg in `find $PROJECTDIR -maxdepth 3 -mindepth 3 -type d | grep -v \\.svn` ; do
-#	echo -n "."
 	for lang in $LANGUAGES; do
 		if [ ! -f $pkg/$lang.po ] ; then
 			cp $pkg/templates.pot $pkg/$lang.po
@@ -132,16 +133,15 @@
 			msgmerge -U $pkg/lang.po $pkg/templates.pot >/dev/null 2>&1
 		fi
 	done
-#	echo " Done."
 done
 
 
 # Now commit the whole stuff to SVN
-echo "  Committing to SVN"
+echo "  Committing to SVN..."
 cd $PROJECTDIR
 svn -q up
 # echo "   Committing updated files"
-svn commit -m"[SILENT_COMMIT] Update existing files for `date +%Y%m%d%H%M`"
+svn -q commit -m"[SILENT_COMMIT] Update existing files for `date +%Y%m%d%H%M`"
 # find . -type d | grep -v \\.svn | xargs svn add -N 2>/dev/null
 # echo "   Adding new directories"
 # find . -type d | grep -v \\.svn | xargs svn add -N 2>/dev/null
@@ -153,11 +153,12 @@
 # Now we need to find out what directories are in $PROJECTDIR but
 # aren't anymore in the tarball. Most of the time, this will be
 # packages that dropped po-debconf support
+echo "  Finding added/removed files/directories..."
 cd $PROJECTDIR
 find . -mindepth 3 -maxdepth 3 -type d | grep -v \\.svn > /tmp/list-pootle
 cd $TEMPDIR
 find . -mindepth 3 -maxdepth 3 -type d > /tmp/list-tarball
-# We display the diff. It will be up to a human to delete
+# We display the diff. It will be up to a human to delete/add
 # the relevant dirs in SVN (too dangerous)
 diff -d -I "lintian" -I "powertweak" /tmp/list-tarball  /tmp/list-pootle
 
@@ -165,6 +166,6 @@
 rm /tmp/list-tarball  /tmp/list-pootle >/dev/null 2>&1 || true
 rm -rf $TEMPDIR >/dev/null 2>&1 || true
 
-echo "Refreshing Pootle stats"
+echo "Refreshing Pootle stats..."
 cd $PROJECTDIR
-sudo -u pootle /usr/sbin/PootleServer --refreshstats
+sudo -u pootle /usr/sbin/PootleServer --refreshstats >/dev/null




More information about the Debian-l10n-commits mailing list