docs-common/bin fdp-functions,1.16,1.17
Paul W. Frields (pfrields)
fedora-docs-commits at redhat.com
Sat Aug 19 18:26:34 UTC 2006
Author: pfrields
Update of /cvs/docs/docs-common/bin
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv25902
Modified Files:
fdp-functions
Log Message:
Add useful rpminfo_exists function and wrappers for new get-title and
get-desc XSLT
Index: fdp-functions
===================================================================
RCS file: /cvs/docs/docs-common/bin/fdp-functions,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -r1.16 -r1.17
--- fdp-functions 12 Aug 2006 20:00:30 -0000 1.16
+++ fdp-functions 19 Aug 2006 18:26:32 -0000 1.17
@@ -24,6 +24,14 @@
XMLFORMAT=${XMLFORMAT:-"${FDPBINDIR}/xmlformat"}
XMLFOPTS=${XMLFOPTS:-"-f ${FDPBINDIR}/xmlformat-fdp.conf"}
+rpminfo_exists()
+{
+ if [ ! -f "${RPMINFO}" ]; then
+ echo "File ${RPMINFO} missing." >&2
+ return 1
+ fi
+}
+
get_all_workers()
{
# Return list of workers, in format "email:wholename"
@@ -49,6 +57,16 @@
"${FDPPKGDIR}/get-worker.xsl" "${RPMINFO}"
}
+get_title()
+{
+ rpminfo_exists && ${XSLTPROC} "${FDPPKGDIR}/get-title.xsl" "${RPMINFO}"
+}
+
+get_desc()
+{
+ rpminfo_exists && ${XSLTPROC} "${FDPPKGDIR}/get-desc.xsl" "${RPMINFO}"
+}
+
version()
{
# Return latest revision for an optional role argument
More information about the Fedora-docs-commits
mailing list