[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

[PATCH] Add/update po status mailer scripts in tools/po/

From: Erik Huelsmann <e.huelsmann_at_gmx.net>
Date: 2004-07-02 11:46:22 CEST

Hi,

The patch I attached below is what I use locally to generate the po file
status reports. Due to me being absent starting tomorrow, I'm unable to run
the script next week and the week after. (I'm turning off the system which
runs the cronjob.)

Should someone care to see the updates, you're invited to take over with
this patch. Should you be a committer, you're invited to clean it up (if
necessary) and commit it.

Anyway, I'll be back July 19th. I hope the source speaks for itself, but
I'll be on IRC until saturday morning (CET) for who wants to reach me.

bye,

Erik.

Index: tools/po/svn-po-status-report.sh
===================================================================
--- tools/po/svn-po-status-report.sh (revision 10076)
+++ tools/po/svn-po-status-report.sh (working copy)
@@ -14,15 +14,17 @@
  
  
  
-EXEC_PATH=`dirname "$0"`
-MSGATTRIB=msgattrib
-GREP=grep
-LC='wc -l'
+EXEC_PATH=`/usr/bin/dirname "$0"`
+MSGATTRIB=/usr/local/bin/msgattrib
+GREP=/bin/grep
+LC='/usr/bin/wc -l'
  
 cd $EXEC_PATH/../..
  
  
-wc_version=`svnversion . | sed -e 's/M//'`
+wc_version=`/usr/local/bin/svnversion . | sed -e 's/M//'`
+cd subversion/po
+
 echo "
  
 Subversion translation status report for revision $wc_version
Index: tools/po/svn-po-status-run.sh
===================================================================
--- tools/po/svn-po-status-run.sh (revision 0)
+++ tools/po/svn-po-status-run.sh (revision 0)
@@ -0,0 +1,72 @@
+#!/bin/sh
+
+export PATH=/usr/local/bin:/usr/bin:/bin
+
+DIRNAME=/usr/bin/dirname
+PWD=/bin/pwd
+SED=/bin/sed
+SENDMAIL=/usr/lib/sendmail
+SVN=/usr/local/bin/svn
+SVNVERSION=/usr/local/bin/svnversion
+REVISION_PREFIX='r'
+
+
+
+EXEC_PATH="`dirname $0`"
+cd $EXEC_PATH/../..
+
+
+root_path="`pwd`"
+ROOT_PARENT_PATH="`dirname $root_path`"
+branch_name="`echo $root_path | sed -e "s@$ROOT_PARENT_PATH/@@"`"
+
+mail_from='e.huelsmann@gmx.net'
+mail_to='dev@subversion.tigris.org'
+output_log="$root_path/po-status-stdout-log"
+error_log="$root_path/po-status-stderr-log"
+
+rm $output_log 2>/dev/null ; touch $output_log
+rm $error_log 2>/dev/null ; touch $error_log
+
+
+if test -e "$root_path/config.po" ; then
+ CONFIGURE="$root_path/config.po"
+elif test -e "$root_path/config.nice" ; then
+ CONFIGURE="$root_path/config.nice"
+else
+ CONFIGURE="$root_path/configure"
+fi
+
+# prevent conflicts
+$SVN revert --recursive subversion/po 2>>$error_log >>$output_log || \
+{
+ # mail your output!
+ exit 1
+}
+
+if test -e "$root_path/Makefile" ; then
+ # prevent swiches or anything from breaking the update
+ make clean 2>>$error_log >>$output_log
+fi
+
+# update && initialize
+$SVN update 2>>$error_log >>$output_log && \
+./autogen.sh 2>>$error_log >>$output_log && \
+$CONFIGURE 2>>$error_log >>$output_log && \
+make locale-gnu-po-update 2>>$error_log >>$output_log || \
+{
+ # mail your output
+ echo "Unable to successfully complete; check error log."
+ exit 1
+}
+
+
+revision="`$SVNVERSION . | sed -e 's/M//'`"
+
+$SENDMAIL -t <<EOF
+From: $mail_from
+To: $mail_to
+Subject: [l10n] Translation status for $branch_name
$REVISION_PREFIX$revision
+
+`$EXEC_PATH/svn-po-status-report.sh`
+EOF
 
Property changes on: tools/po/svn-po-status-run.sh
___________________________________________________________________
Name: svn:executable
   + *
 

-- 
+++ Jetzt WLAN-Router für alle DSL-Einsteiger und Wechsler +++
GMX DSL-Powertarife zudem 3 Monate gratis* http://www.gmx.net/dsl
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Fri Jul 2 11:47:23 2004

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.