[Debian-l10n-commits] [SCM] Debian i18n - l10n development - dl10n robots branch, master, updated. 9989ba69eabd3ea55ff47ef3a6fce7ca212efe59
Nicolas François
nicolas.francois at centraliens.net
Sun Jun 17 15:06:38 UTC 2012
The following commit has been merged in the master branch:
commit 9989ba69eabd3ea55ff47ef3a6fce7ca212efe59
Author: Nicolas François <nicolas.francois at centraliens.net>
Date: Sun Jun 17 16:48:38 2012 +0200
Cleanups for i18n.d.o migration.
* cron/spiderbts: Cleanups.
* cron/spiderbts: Update to the i18n.d.o layout.
* cron/spiderbts: Do not create the html directories, dl10n-html
will create them if missing.
* cron/spiderbts: Update a tmp database before moving it to its
final place (this should reduce corruptions in case of disk
issues).
diff --git a/Changelog b/Changelog
index 0cf2852..18bd04b 100644
--- a/Changelog
+++ b/Changelog
@@ -1,5 +1,15 @@
2012-06-17 Nicolas François <nicolas.francois at centraliens.net>
+ * cron/spiderbts: Cleanups.
+ * cron/spiderbts: Update to the i18n.d.o layout.
+ * cron/spiderbts: Do not create the html directories, dl10n-html
+ will create them if missing.
+ * cron/spiderbts: Update a tmp database before moving it to its
+ final place (this should reduce corruptions in case of disk
+ issues).
+
+2012-06-17 Nicolas François <nicolas.francois at centraliens.net>
+
* dl10n-html: Cleanup.
* dl10n-html: Do not create html/include.
* dl10n-html: Remove the files created in include/ after usage.
diff --git a/cron/spiderbts b/cron/spiderbts
index e0dcaaa..89df4ea 100755
--- a/cron/spiderbts
+++ b/cron/spiderbts
@@ -1,24 +1,24 @@
#!/bin/bash
+set -e
+
# spiderbts - Check the status of bugs attached to the messages tagged BTS.
# (it also check for new messages and update the coordination pages)
-DL10NDIR=/srv/dl10n-stuff/svn/dl10n
-LOGDIR=/srv/dl10n-stuff/log
-LOGPREFIX=$LOGDIR/spiderbts.cron.$(date "+%Y%m%d-%H%M")
-OUTDIR=/srv/i18n.debian.net/www/debian-l10n-coordination
+I18NROOT=/srv/i18n.debian.org/
+DL10NDIR=$I18NROOT/dl10n/git
+LOGDIR=$I18NROOT/log/spiderbts
+LOGPREFIX=$LOGDIR/spiderbts.$(date "+%Y%m%d-%H%M")
+OUTDIR=$I18NROOT/dl10n/data/spiderbts
+TMPDB="$OUTDIR/data/tmp"
-mkdir -p $LOGDIR
-mkdir -p $OUTDIR
+export PERLLIB="$DL10NDIR/lib"
OPTS="--check-bts"
-cd $DL10NDIR
+mkdir -p "$LOGDIR"
+mkdir -p "$OUTDIR/data"
-mkdir -p html/include
-mkdir -p data
-mkdir -p include
-# dutch not supported
-mkdir -p html/{arabic,catalan,czech,danish,english,german,spanish,french,galician,indonesian,italian,brazilian,romanian,russian,slovak,swedish,turkish}
+cd $OUTDIR
# nl not supported
for language in ar ca cs da de en es fr gl id it pt_BR ro ru sk sv tr; do
@@ -29,17 +29,20 @@ for language in ar ca cs da de en es fr gl id it pt_BR ro ru sk sv tr; do
then
echo "You need to initialize data/status.$language"
fi
- echo "Running dl10n-spider ($language)..." >> $LOGPREFIX.log
- PERLLIB=lib ./dl10n-spider $OPTS $language >> $LOGPREFIX.log \
- 2>> $LOGPREFIX.err
- echo "Running dl10n-html ($language)..." >> $LOGPREFIX.log
- PERLLIB=lib ./dl10n-html $language >> $LOGPREFIX.log \
- 2>> $LOGPREFIX.err
+
+ if [ -f "$OUTDIR/data/status.$language" ]; then
+ cp "$OUTDIR/data/status.$language" "$TMPDB"
+ fi
+ echo "Running dl10n-spider ($language)..." >> $LOGPREFIX.log
+ $DL10NDIR/dl10n-spider --sdb "$TMPDB" $OPTS $language >> $LOGPREFIX.log \
+ 2>> $LOGPREFIX.err
+ mv -f "$TMPDB" "$OUTDIR/data/status.$language"
+
+ echo "Running dl10n-html ($language)..." >> $LOGPREFIX.log
+ $DL10NDIR/dl10n-html --sdb "$OUTDIR/data/status.$language" $language >> $LOGPREFIX.log \
+ 2>> $LOGPREFIX.err
done
# Only display the errors to the cronjob subscribers
-cat $LOGPREFIX.err
+[ -f $LOGPREFIX.err ] && cat $LOGPREFIX.err
-# Install the new HTML pages
-# dutch not supported
-cp -r html/{arabic,catalan,czech,danish,english,german,spanish,french,galician,indonesian,italian,brazilian,romanian,russian,slovak,swedish,turkish} $OUTDIR/
--
Debian i18n - l10n development - dl10n robots
More information about the Debian-l10n-commits
mailing list