From 861e89e4488f28b1915396a82bd36c358099f9f8 Mon Sep 17 00:00:00 2001 From: "Paul W. Frields" Date: Sun, 27 Aug 2006 23:26:09 +0000 Subject: Add a date function --- bin/fdp-functions | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'bin/fdp-functions') diff --git a/bin/fdp-functions b/bin/fdp-functions index e57f2a2..982154a 100644 --- a/bin/fdp-functions +++ b/bin/fdp-functions @@ -84,6 +84,20 @@ version() echo } +date() +{ + # Return latest date for an optional role argument + if [ ! -z "$1" ]; then + OPTS="--stringparam role $1" + fi + if [ -f "${RPMINFO}" ]; then + ${XSLTPROC} ${OPTS} "${FDPPKGDIR}/doc-date.xsl" "$RPMINFO" + else + echo -n TBD + fi + echo +} + iso2date() { # Convert ISO format date (YYYY-MM-DD) to ctime(3) # format, which is needed by the "rpm-info.xml" @@ -109,6 +123,10 @@ get_latest_revision() { version $@ } +get_latest_date() { + date $@ +} + validate_rpm_info() { xmllint --noout --valid ${RPMINFO} && echo ${RPMINFO} OK } -- cgit