Ticket #2111: allow pause in copy/move/delete file operation.
[midnight-commander.git] / maint / send-po
blob5bb2c637f0f8afaf7bf7cf6851d72d8a3618ab19
1 #!/bin/sh
3 # Generate mc.pot, upload it and *.po files to the FTP directory.
5 set -e
7 if ! test -d po; then
8 echo "Run this script in the top level source directory" >&2
9 exit 1
12 DOMAIN=mc
13 COPYRIGHT_HOLDER="Free Software Foundation, Inc."
14 XGETTEXT_OPTIONS="--keyword=_ --keyword=N_ --keyword=Q_"
15 XGETTEXT=xgettext
16 MSGMERGE=msgmerge
18 files=`find . -name '*.[ch]' | xargs $XGETTEXT $XGETTEXT_OPTIONS --output=- | \
19 sed -ne '/^#:/{s/#://;s/:[0-9]*/\n/g;s/ //g;p;}' | sort -u`
21 $XGETTEXT --default-domain=$DOMAIN --directory=. \
22 --add-comments=TRANSLATORS: $XGETTEXT_OPTIONS \
23 --copyright-holder="$COPYRIGHT_HOLDER" --output=po/new-mc.pot $files
25 for file in po/*.po; do
26 $MSGMERGE --output=po/new-`basename $file` $file po/new-mc.pot
27 done
29 # Location of the snapshot directory
30 SITE="login.ibiblio.org"
31 DIR="/public/ftp/pub/Linux/utils/file/managers/mc/po"
33 scp po/new-* "$SITE:$DIR/"
35 ssh $SITE "cd $DIR; for file in new-*; do mv -f \$file \${file#new-}; done"
37 rm -f po/new-*