summaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
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}"
+}