docs-common/bin fdp-functions,1.17,1.18

Paul W. Frields (pfrields) fedora-docs-commits at redhat.com
Sun Aug 27 23:26:11 UTC 2006


Author: pfrields

Update of /cvs/docs/docs-common/bin
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv21306

Modified Files:
	fdp-functions 
Log Message:
Add a date function



Index: fdp-functions
===================================================================
RCS file: /cvs/docs/docs-common/bin/fdp-functions,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -r1.17 -r1.18
--- fdp-functions	19 Aug 2006 18:26:32 -0000	1.17
+++ fdp-functions	27 Aug 2006 23:26:09 -0000	1.18
@@ -84,6 +84,20 @@
 	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" <revision at date>
@@ -109,6 +123,10 @@
     version $@
 }
 
+get_latest_date() {
+    date $@
+}
+
 validate_rpm_info()	{
 	xmllint --noout --valid ${RPMINFO} && echo ${RPMINFO} OK
 }




More information about the docs-commits mailing list