File: update-pot.sh

package info (click to toggle)
live-magic 1.5%2Blenny2
  • links: PTS, VCS
  • area: main
  • in suites: lenny
  • size: 544 kB
  • ctags: 279
  • sloc: python: 1,589; sh: 85; makefile: 9
file content (27 lines) | stat: -rwxr-xr-x 484 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#!/bin/sh

set -eu

. po/gettext-config

if [ ! -d po/ ] && [ -d ../po/ ]
then
	cd ..
fi

FILES="$(mktemp)"
trap 'rm -f ${FILES}' EXIT

find ${DIRS} -type f -printf "%p\n" > ${FILES}

REGEX="$(echo ${EXTENSIONS} | sed 's@ @\\|@g')"
sed -i -n -e '/\('"${REGEX}"'\)$/p' ${FILES}

exec xgettext \
	--files-from=${FILES} \
	--default-domain=${APPLICATION} \
	--force-po \
	--foreign-user \
	--package-name=${APPLICATION} \
	--msgid-bugs-address=${EMAIL} \
	--output=po/${APPLICATION}.pot