Merge branch '2018_fptfs_strcpy'
[kaloumi3.git] / maint / send-po
blob939639e38bcc1286b2762495f3e3f91d20160841
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 | grep -v 'regex.c'`
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-*