summaryrefslogtreecommitdiffstats
path: root/third_party/heimdal/po/gen-po.in
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-05 17:47:29 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-05 17:47:29 +0000
commit4f5791ebd03eaec1c7da0865a383175b05102712 (patch)
tree8ce7b00f7a76baa386372422adebbe64510812d4 /third_party/heimdal/po/gen-po.in
parentInitial commit. (diff)
downloadsamba-4f5791ebd03eaec1c7da0865a383175b05102712.tar.xz
samba-4f5791ebd03eaec1c7da0865a383175b05102712.zip
Adding upstream version 2:4.17.12+dfsg.upstream/2%4.17.12+dfsgupstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r--third_party/heimdal/po/gen-po.in39
1 files changed, 39 insertions, 0 deletions
diff --git a/third_party/heimdal/po/gen-po.in b/third_party/heimdal/po/gen-po.in
new file mode 100644
index 0000000..78ef93d
--- /dev/null
+++ b/third_party/heimdal/po/gen-po.in
@@ -0,0 +1,39 @@
+#!/bin/sh
+
+top_srcdir=@top_srcdir@
+name="@PACKAGE_NAME@"
+version="@PACKAGE_VERSION@"
+
+domain=$1
+shift
+
+outdir=${top_srcdir}/po/${domain}
+outfile=${outdir}/${domain}.pot
+
+test -d $outdir || mkdir $outdir
+
+xgettext \
+ --package-name="${name}" \
+ --package-version="${version}" \
+ --foreign-user \
+ --default-domain=${domain} \
+ --add-comments \
+ --keyword=N_ \
+ --keyword=NP_ \
+ -o ${outfile}.new \
+ "$@"
+
+test -f ${outfile}.new && \
+ perl -pi -e "s@${top_srcdir}/@@" ${outfile}.new
+
+grep -v "POT-Creation-Date:" ${outfile}.new > ${outfile}.new2
+grep -v "POT-Creation-Date:" ${outfile} > ${outfile}.old
+
+if ! diff ${outfile}.old ${outfile}.new2 >/dev/null; then
+ echo "${outfile} changed"
+ cp ${outfile}.new ${outfile}
+fi
+rm ${outfile}.new* ${outfile}.old
+
+exit 0
+