[Debian-l10n-commits] r2536 - in /dl10n/trunk: Changelog compendia/convert_or_remove compendia/createcompendium compendia/l10n.conf

nekral-guest at users.alioth.debian.org nekral-guest at users.alioth.debian.org
Sat Feb 19 22:22:45 UTC 2011


Author: nekral-guest
Date: Sat Feb 19 22:22:43 2011
New Revision: 2536

URL: http://svn.debian.org/wsvn/?sc=1&rev=2536
Log:
Commit changes already in production:
	* compendia/createcompendium: Remove old compendia and log file
	when a compendia is successfully generated.
	* compendia/convert_or_remove: Really perform cleanup.
	* compendia/l10n.conf: Create the gen-compendia temporary file if
	it does not exist.

Modified:
    dl10n/trunk/Changelog
    dl10n/trunk/compendia/convert_or_remove
    dl10n/trunk/compendia/createcompendium
    dl10n/trunk/compendia/l10n.conf

Modified: dl10n/trunk/Changelog
URL: http://svn.debian.org/wsvn/dl10n/trunk/Changelog?rev=2536&op=diff
==============================================================================
--- dl10n/trunk/Changelog (original)
+++ dl10n/trunk/Changelog Sat Feb 19 22:22:43 2011
@@ -1,3 +1,11 @@
+2011-02-19  Nicolas François  <nicolas.francois at centraliens.net>
+
+	* compendia/createcompendium: Remove old compendia and log file
+	when a compendia is successfully generated.
+	* compendia/convert_or_remove: Really perform cleanup.
+	* compendia/l10n.conf: Create the gen-compendia temporary file if
+	it does not exist.
+
 2010-09-09  Denis Barbier  <bouzim at gmail.com>
 
 	* lib/Debian/Pkg/Tar.pm: Fix PO extraction bug (dokuwiki)

Modified: dl10n/trunk/compendia/convert_or_remove
URL: http://svn.debian.org/wsvn/dl10n/trunk/compendia/convert_or_remove?rev=2536&op=diff
==============================================================================
--- dl10n/trunk/compendia/convert_or_remove (original)
+++ dl10n/trunk/compendia/convert_or_remove Sat Feb 19 22:22:43 2011
@@ -9,6 +9,7 @@
 		echo "I: $1: is included in compendium"
 	else
 		echo "E: $1: file failed the tests, removed"
+		rm -f "$1" "$1.utf"
 	fi
 else
 	echo "E: $1: file removed from compilation"

Modified: dl10n/trunk/compendia/createcompendium
URL: http://svn.debian.org/wsvn/dl10n/trunk/compendia/createcompendium?rev=2536&op=diff
==============================================================================
--- dl10n/trunk/compendia/createcompendium (original)
+++ dl10n/trunk/compendia/createcompendium Sat Feb 19 22:22:43 2011
@@ -1,4 +1,6 @@
 #!/bin/bash
+
+set -e
 
 # To guarantee that files may be written by the group
 umask 002
@@ -19,8 +21,6 @@
 # maybe because find doesn't have it defined in its environment
 find "$POTMPDIR" -name *.po -exec ./convert_or_remove {} \;
 msgcat -o "$RESULTS/compendium-$MSGLANG-stamp$STAMP.po" $POTMPDIR/*.po
-# In order to be useful, the latest compendium needs to be used by users
-ln -sf "$RESULTS/compendium-$MSGLANG-stamp$STAMP.po" "$RESULTS/compendium-$MSGLANG-LATEST.po"
 
 RESULT=$?
 
@@ -30,6 +30,12 @@
 if [ "$RESULT" = "0" ]
 then
 	echo "III: generated $RESULTS/compendium-$MSGLANG-stamp$STAMP.po"
+
+        # In order to be useful, the latest compendium needs to be used by users
+        ln -sf "$RESULTS/compendium-$MSGLANG-stamp$STAMP.po" "$RESULTS/compendium-$MSGLANG-LATEST.po"
+	# Remove old compendia and log files if we were successful
+	find "$RESULTS" -name "2*.log" -a -mtime "+1" -delete
+	find "$RESULTS" -name "compendium-*.po" -a -mtime "+1" -delete
 else
 	echo "EEE: failed to generate $RESULTS/compendium-$MSGLANG-stamp$STAMP.po"
 fi

Modified: dl10n/trunk/compendia/l10n.conf
URL: http://svn.debian.org/wsvn/dl10n/trunk/compendia/l10n.conf?rev=2536&op=diff
==============================================================================
--- dl10n/trunk/compendia/l10n.conf (original)
+++ dl10n/trunk/compendia/l10n.conf Sat Feb 19 22:22:43 2011
@@ -7,6 +7,7 @@
 export PODEBCONFTGZ='/srv/i18n.debian.net/www/debian-l10n-material/po-debconf-unstable.tar.gz'
 export SITEDIR=/srv/i18n.debian.net/www/debian-l10n-material/po/unstable
 
+[ -d "/srv/i18n.debian.net/tmp/gen-compendia" ] || mkdir /srv/i18n.debian.net/tmp/gen-compendia
 [ -z "$NOTMPYET" ] && export POTMPDIR=`mktemp -d /srv/i18n.debian.net/tmp/gen-compendia/cpd.XXXXXXXXXX` && NOTMPYET=no || true
 export RESULTS="/srv/i18n.debian.net/www/debian-l10n-compendia/po/"
 




More information about the Debian-l10n-commits mailing list