summaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
authorTommy Reynolds <Tommy.Reynolds@MegaCoder.com>2006-02-03 15:50:47 +0000
committerTommy Reynolds <Tommy.Reynolds@MegaCoder.com>2006-02-03 15:50:47 +0000
commitaa73c5041ebb7f99ead9d584dfb09ad7995504e7 (patch)
treef3153a7b86644922f068bc4bf24136c43d4873eb /bin
parent8b2c15a87d407aa5f7299fad00617285abc7513d (diff)
downloadfedora-doc-utils-aa73c5041ebb7f99ead9d584dfb09ad7995504e7.tar.gz
fedora-doc-utils-aa73c5041ebb7f99ead9d584dfb09ad7995504e7.tar.xz
fedora-doc-utils-aa73c5041ebb7f99ead9d584dfb09ad7995504e7.zip
Added shell command "apply_po foo-en.xml" has a shortcut to the
actual "po2xml foo-en.xml foo-en.po" file. Use it like this: fdpsh> make po fdpsh> kbable foo-en.po fdpsh> apply_po foo-en.xml >foo-xx.xml
Diffstat (limited to 'bin')
-rw-r--r--bin/fdp-functions12
1 files changed, 12 insertions, 0 deletions
diff --git a/bin/fdp-functions b/bin/fdp-functions
index 316450e..222a305 100644
--- a/bin/fdp-functions
+++ b/bin/fdp-functions
@@ -84,3 +84,15 @@ get_latest_revision() {
validate_rpm_info() {
xmllint --noout --valid ${RPMINFO} && echo ${RPMINFO} OK
}
+
+apply_po() {
+ if [ $# -ne 1 ]; then
+ echo "usage: apply_po filename.xml">&2
+ fi
+ POFILE=`/bin/basename "$1" .xml`.po
+ if [ ! -f "${POFILE}" ]; then
+ echo "apply_po: file '${POFILE}' not found." >&2
+ return 1
+ fi
+ po2xml "$1" "${POFILE}"
+}