From 8129d1ae5ee37a2248078717c905779624e7c890 Mon Sep 17 00:00:00 2001 From: Pavel Roskin Date: Wed, 27 Jul 2005 20:00:41 +0000 Subject: [PATCH] Generate mc.pot, upload it and *.po files to the FTP directory. --- maint/send-po | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100755 maint/send-po diff --git a/maint/send-po b/maint/send-po new file mode 100755 index 000000000..4661a86b4 --- /dev/null +++ b/maint/send-po @@ -0,0 +1,36 @@ +#!/bin/sh + +# Generate mc.pot, upload it and *.po files to the FTP directory. + +set -e + +if ! test -d po; then + echo "Run this script in the top level source directory" >&2 + exit 1 +fi + +DOMAIN=mc +COPYRIGHT_HOLDER="Free Software Foundation, Inc." +XGETTEXT_OPTIONS="--keyword=_ --keyword=N_ --keyword=gettext_ui" +XGETTEXT=xgettext + +files=`find . -name '*.[ch]' | xargs $XGETTEXT $XGETTEXT_OPTIONS --output=- | \ + sed -ne '/^#:/{s/#://;s/:[0-9]*/\n/g;s/ //g;p;}' | sort -u | grep -v 'regex.c'` + +$XGETTEXT --default-domain=$DOMAIN --directory=. \ + --add-comments=TRANSLATORS: $XGETTEXT_OPTIONS \ + --copyright-holder="$COPYRIGHT_HOLDER" --output=po/mc.pot.new $files + +for file in po/*.po; do + cp -f $file $file.new +done + +# Location of the snapshot directory +SITE="login.ibiblio.org" +DIR="/public/ftp/pub/Linux/utils/file/managers/mc/po" + +scp po/*.new "$SITE:$DIR/" + +ssh $SITE "cd $DIR; for file in *.new; do mv -f \$file \`basename \$file .new\`; done" + +rm -f po/*.new