2005-07-28 00:00:41 +04:00
|
|
|
#!/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."
|
2005-10-04 19:22:35 +04:00
|
|
|
XGETTEXT_OPTIONS="--keyword=_ --keyword=N_ --keyword=Q_"
|
2005-07-28 00:00:41 +04:00
|
|
|
XGETTEXT=xgettext
|
2005-08-02 08:36:33 +04:00
|
|
|
MSGMERGE=msgmerge
|
2005-07-28 00:00:41 +04:00
|
|
|
|
|
|
|
files=`find . -name '*.[ch]' | xargs $XGETTEXT $XGETTEXT_OPTIONS --output=- | \
|
2011-05-25 17:59:27 +04:00
|
|
|
sed -ne '/^#:/{s/#://;s/:[0-9]*/\n/g;s/ //g;p;}' | sort -u`
|
2005-07-28 00:00:41 +04:00
|
|
|
|
|
|
|
$XGETTEXT --default-domain=$DOMAIN --directory=. \
|
|
|
|
--add-comments=TRANSLATORS: $XGETTEXT_OPTIONS \
|
2005-09-07 23:58:56 +04:00
|
|
|
--copyright-holder="$COPYRIGHT_HOLDER" --output=po/new-mc.pot $files
|
2005-07-28 00:00:41 +04:00
|
|
|
|
|
|
|
for file in po/*.po; do
|
2005-09-07 23:58:56 +04:00
|
|
|
$MSGMERGE --output=po/new-`basename $file` $file po/new-mc.pot
|
2005-07-28 00:00:41 +04:00
|
|
|
done
|
|
|
|
|
|
|
|
# Location of the snapshot directory
|
|
|
|
SITE="login.ibiblio.org"
|
|
|
|
DIR="/public/ftp/pub/Linux/utils/file/managers/mc/po"
|
|
|
|
|
2005-09-07 23:58:56 +04:00
|
|
|
scp po/new-* "$SITE:$DIR/"
|
2005-07-28 00:00:41 +04:00
|
|
|
|
2005-09-07 23:58:56 +04:00
|
|
|
ssh $SITE "cd $DIR; for file in new-*; do mv -f \$file \${file#new-}; done"
|
2005-07-28 00:00:41 +04:00
|
|
|
|
2005-09-07 23:58:56 +04:00
|
|
|
rm -f po/new-*
|