diff options
author | Paul W. Frields <stickster@gmail.com> | 2006-08-19 18:26:32 +0000 |
---|---|---|
committer | Paul W. Frields <stickster@gmail.com> | 2006-08-19 18:26:32 +0000 |
commit | 632e55bcd133093590b5490d187b05c3fed6b1b4 (patch) | |
tree | 8268c576d2a8c114ff388108c3f3c2bbbd01fdfa | |
parent | e1a1fd1f5da5b06b37c24000e13855a24861848d (diff) | |
download | fedora-doc-utils-632e55bcd133093590b5490d187b05c3fed6b1b4.tar.gz fedora-doc-utils-632e55bcd133093590b5490d187b05c3fed6b1b4.tar.xz fedora-doc-utils-632e55bcd133093590b5490d187b05c3fed6b1b4.zip |
Add useful rpminfo_exists function and wrappers for new get-title and
get-desc XSLT
-rw-r--r-- | bin/fdp-functions | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/bin/fdp-functions b/bin/fdp-functions index 613c5a1..e57f2a2 100644 --- a/bin/fdp-functions +++ b/bin/fdp-functions @@ -24,6 +24,14 @@ XSLTPROC=${XSLTPROC:-xsltproc} 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 @@ get_worker_attribute() "${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 |