[Debian-l10n-commits] [SCM] Debian i18n - l10n development - dl10n robots branch, master, updated. 46405b47ba75f53324b789476dce0ed27dccab23

Simon Paillard spaillard at debian.org
Sun Jun 17 13:57:10 UTC 2012


The following commit has been merged in the master branch:
commit 46405b47ba75f53324b789476dce0ed27dccab23
Author: Simon Paillard <spaillard at debian.org>
Date:   Sun Jun 17 13:54:25 2012 +0000

    Add a central dl10n.conf, to be sourced from cron/ scripts

diff --git a/cron/nmu-update b/cron/nmu-update
index 7d50c16..98ce2e7 100755
--- a/cron/nmu-update
+++ b/cron/nmu-update
@@ -2,25 +2,23 @@
 
 set -e
 
-I18NROOT=/srv/i18n.debian.org/
-DL10NDIR=$I18NROOT/dl10n/git
-LOGDIR=$I18NROOT/log/l10n-nmu
-LOGPREFIX=$LOGDIR/dl10n-nmu.$(date "+%Y%m%d-%H%M")
-OUTDIR=$I18NROOT/htdocs/l10n-nmu
-STAT_DATABASE=$I18NROOT/htdocs/material/data/unstable.gz
-TMPDIR=$I18NROOT/tmp
-POPCON_FILE=$TMPDIR/by_inst
+PROGNAME=$(basename $0)
+
+# Get global config and checks
+source $(dirname $0)/../etc/dl10n.conf
+
+POPCON_FILE=$TMPDIR/
 
 cd $DL10NDIR
 
 umask 0002
 
-wget -O $POPCON_FILE -o /dev/null http://popcon.debian.org/source/by_inst || {
+wget -N $POPCON_FILE -o /dev/null http://popcon.debian.org/source/by_inst || {
 	echo "Failed to download http://popcon.debian.org/source/by_inst"
 	exit 1
 }
 
-PERLLIB=lib ./dl10n-nmu		\
+$DL10NDIR/dl10n-nmu		\
 	--db "$STAT_DATABASE"	\
 	--gendir "$OUTDIR"	\
 	--popcon "$POPCON_FILE"	\
diff --git a/etc/dl10n.conf b/etc/dl10n.conf
new file mode 100644
index 0000000..b9e8520
--- /dev/null
+++ b/etc/dl10n.conf
@@ -0,0 +1,30 @@
+I18NROOT=/srv/i18n.debian.org/
+
+## INPUTS
+# Location of the mirror
+MIRRORDIR=/srv/mirrors/debian/
+
+# Location of the dl10n checkout
+DL10NDIR=$I18NROOT/dl10n/git
+STAT_DATABASE_SID=$I18NROOT/htdocs/material/data/unstable.gz
+STAT_DATABASE_TESTING=$I18NROOT/htdocs/material/data/testing.gz
+# Default to sid, can be overwirtten with _TESTING
+STAT_DATABASE=$STAT_DATABASE_SID
+
+## OUTPUTS
+# LOGS
+LOGDIR=$I18NROOT/log/$PROGNAME
+LOGPREFIX=$LOGDIR/$PROGNAME.$(date "+%Y%m%d-%H%M")
+
+# Temporary directory where the packages are extracted
+# Location where the l10n material will be extracted
+TMPDIR=$I18NROOT/tmp/$PROGNAME
+
+# Where data are extracted (and maybe later on made publicly available)
+OUTDIR=$DL10NDIR/../data/$PROGNAME
+
+# Use libs from dl10n
+export PERLLIB="$DL10NDIR/lib"
+
+# Make sure directories exist
+mkdir -p $LOGDIR $TMPDIR $OUTDIR

-- 
Debian i18n - l10n development - dl10n robots



More information about the Debian-l10n-commits mailing list