[Debian-l10n-commits] r1249 - in /dl10n/trunk/pootle/sync-projects.d: 10debconf cfg/10debconf cfg/common x20ddtp
bubulle at users.alioth.debian.org
bubulle at users.alioth.debian.org
Sun Sep 7 14:47:23 UTC 2008
Author: bubulle
Date: Sun Sep 7 14:47:23 2008
New Revision: 1249
URL: http://svn.debian.org/wsvn/?sc=1&rev=1249
Log:
Resync with production scripts
Modified:
dl10n/trunk/pootle/sync-projects.d/10debconf
dl10n/trunk/pootle/sync-projects.d/cfg/10debconf
dl10n/trunk/pootle/sync-projects.d/cfg/common
dl10n/trunk/pootle/sync-projects.d/x20ddtp
Modified: dl10n/trunk/pootle/sync-projects.d/10debconf
URL: http://svn.debian.org/wsvn/dl10n/trunk/pootle/sync-projects.d/10debconf?rev=1249&op=diff
==============================================================================
--- dl10n/trunk/pootle/sync-projects.d/10debconf (original)
+++ dl10n/trunk/pootle/sync-projects.d/10debconf Sun Sep 7 14:47:23 2008
@@ -8,8 +8,7 @@
TEMPDIR=`tempfile --directory=/tmp`
rm $TEMPDIR
-
-cd $POOTLEDIR
+cd $POOTLEDEBCONFDIR
svn -q up
[ -f $TARBALL ] || exit 1
@@ -66,29 +65,29 @@
# Of course, if the directory does not exist in Pootle (new
# package with debconf), we will just add it
# and copy files from the tarball
- if [ -d $POOTLEDIR/$pkg ] ; then
+ if [ -d $POOTLEDEBCONFDIR/$pkg ] ; then
# So, there's something in Pootle
# Cycle over all PO files
for pofile in `\ls -1 $pkg/*.po 2>/dev/null` ; do
filename=`basename $pofile`
- if [ -f $POOTLEDIR/$pkg/$filename ] ; then
+ if [ -f $POOTLEDEBCONFDIR/$pkg/$filename ] ; then
# Give priority to the file in Pootle
- msgcat --use-first $POOTLEDIR/$pkg/$filename $pofile >$TEMPFILE 2>/dev/null
+ msgcat --use-first $POOTLEDEBCONFDIR/$pkg/$filename $pofile >$TEMPFILE 2>/dev/null
# And merge with the POT file from the tarball
- msgmerge -U $TEMPFILE $POOTLEDIR/$pkg/templates.pot >/dev/null 2>&1
+ msgmerge -U $TEMPFILE $POOTLEDEBCONFDIR/$pkg/templates.pot >/dev/null 2>&1
# And overwrite the Pootle file
- cp $TEMPFILE $POOTLEDIR/$pkg/$filename
+ cp $TEMPFILE $POOTLEDEBCONFDIR/$pkg/$filename
else
# Maybe *that* file didn't exist in Pootle
# In such case, just copy it
- cp $pofile $POOTLEDIR/$pkg
- msgmerge -U $POOTLEDIR/$pkg/$filename $POOTLEDIR/$pkg/templates.pot >/dev/null 2>&1
+ cp $pofile $POOTLEDEBCONFDIR/$pkg
+ msgmerge -U $POOTLEDEBCONFDIR/$pkg/$filename $POOTLEDEBCONFDIR/$pkg/templates.pot >/dev/null 2>&1
fi
done
else
# There was no directory in Pootle yet, just copy
- mkdir -p $POOTLEDIR/$pkg
- cp -r $pkg/* $POOTLEDIR/$pkg
+ mkdir -p $POOTLEDEBCONFDIR/$pkg
+ cp -r $pkg/* $POOTLEDEBCONFDIR/$pkg
fi
rm $TEMPFILE 2>/dev/null || true
done
@@ -100,25 +99,25 @@
echo " Cleaning out broken files..."
for file in $BROKEN; do
echo " $file"
- rm $POOTLEDIR/$file
+ rm $POOTLEDEBCONFDIR/$file
done
# Some packages should be ignored for various reasons
echo " Cleaning out ignored packages..."
for pkg in $IGNORE; do
echo " $pkg"
- rm -rf `find $POOTLEDIR -mindepth 3 -maxdepth 3 -name $pkg` #2>/dev/null
+ rm -rf `find $POOTLEDEBCONFDIR -mindepth 3 -maxdepth 3 -name $pkg` #2>/dev/null
done
# And some packages provide useless garbage
echo " Cleaning out garbage..."
for dir in $GARBAGE; do
echo " $dir"
- rm -rf $POOTLEDIR/$dir
+ rm -rf $POOTLEDEBCONFDIR/$dir
done
# What languages are present?
-LANGUAGES=`find $POOTLEDIR -name \*.po | cut -f9 -d\/ | sort | uniq | cut -f1 -d\.`
+LANGUAGES=`find $POOTLEDEBCONFDIR -name \*.po | cut -f9 -d\/ | sort | uniq | cut -f1 -d\.`
# This will allow automatically adding a language as soon as *one* package
# provides a file for it
@@ -126,7 +125,7 @@
# That's slightly suboptimal but this is the only way to have correct
# statistics in Pootle
echo " Updating Pootle files..."
-for pkg in `find $POOTLEDIR -maxdepth 3 -mindepth 3 -type d | grep -v \\.svn` ; do
+for pkg in `find $POOTLEDEBCONFDIR -maxdepth 3 -mindepth 3 -type d | grep -v \\.svn` ; do
for lang in $LANGUAGES; do
if [ ! -f $pkg/$lang.po ] ; then
cp $pkg/templates.pot $pkg/$lang.po
@@ -139,7 +138,7 @@
# Now commit the whole stuff to SVN
echo " Committing to SVN..."
-cd $POOTLEDIR
+cd $POOTLEDEBCONFDIR
svn -q up
# echo " Committing updated files"
svn -q commit -m"[SILENT_COMMIT] Update existing files for `date +%Y%m%d%H%M`"
@@ -151,11 +150,11 @@
# echo " Adding POT files"
# find . -type f -name templates.pot | grep -v \\.svn | xargs svn add 2>/dev/null
-# Now we need to find out what directories are in $POOTLEDIR but
+# Now we need to find out what directories are in $POOTLEDEBCONFDIR 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 $POOTLEDIR
+cd $POOTLEDEBCONFDIR
find . -mindepth 3 -maxdepth 3 -type d | grep -v \\.svn | sort > /tmp/list-pootle
cd $TEMPDIR
find . -mindepth 3 -maxdepth 3 -type d | sort > /tmp/list-tarball
Modified: dl10n/trunk/pootle/sync-projects.d/cfg/10debconf
URL: http://svn.debian.org/wsvn/dl10n/trunk/pootle/sync-projects.d/cfg/10debconf?rev=1249&op=diff
==============================================================================
--- dl10n/trunk/pootle/sync-projects.d/cfg/10debconf (original)
+++ dl10n/trunk/pootle/sync-projects.d/cfg/10debconf Sun Sep 7 14:47:23 2008
@@ -17,3 +17,6 @@
# tarball location
TARBALL=/org/dl10n-stuff/www/po-debconf.tar.gz
+
+# Directory for Pootle debconf stuff
+POOTLEDEBCONFDIR=$POOTLEDIR/debconf
Modified: dl10n/trunk/pootle/sync-projects.d/cfg/common
URL: http://svn.debian.org/wsvn/dl10n/trunk/pootle/sync-projects.d/cfg/common?rev=1249&op=diff
==============================================================================
--- dl10n/trunk/pootle/sync-projects.d/cfg/common (original)
+++ dl10n/trunk/pootle/sync-projects.d/cfg/common Sun Sep 7 14:47:23 2008
@@ -1,5 +1,5 @@
#!/bin/sh
# The location of Pootle files
-POOTLEDIR=/var/lib/pootle/debconf
+POOTLEDIR=/srv/pootle.debian.net/pootle
Modified: dl10n/trunk/pootle/sync-projects.d/x20ddtp
URL: http://svn.debian.org/wsvn/dl10n/trunk/pootle/sync-projects.d/x20ddtp?rev=1249&op=diff
==============================================================================
--- dl10n/trunk/pootle/sync-projects.d/x20ddtp (original)
+++ dl10n/trunk/pootle/sync-projects.d/x20ddtp Sun Sep 7 14:47:23 2008
@@ -4,7 +4,7 @@
TEMPDIR=`tempfile --directory=$HOME/tmp`
rm $TEMPDIR
-PROJECTDIR=/var/lib/pootle/ddtp
+PROJECTDIR=/srv/pootle.debian.net/pootle/ddtp
DDTPPODIR=/org/ddtp.debian.net/pos
echo " Sync files from the DDTP PO directories"
More information about the Debian-l10n-commits
mailing list