docs-common/bin db2rpm-info,1.2,1.3
Tommy Reynolds (jtr)
fedora-docs-commits at redhat.com
Thu Jan 19 19:50:01 UTC 2006
Author: jtr
Update of /cvs/docs/docs-common/bin
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv3874/docs-common/bin
Modified Files:
db2rpm-info
Log Message:
First cut a integrating the RPM packaging stuff with the
"docs-common/Makefile.common" infrastructure. While this appears to
work *somewhat* with the "example-tutorial", it is certainly not
ready for prime time yet.
TODO:
1) Verify that all generated RPM's have the necessary files inside.
2) Mangle the "../docs-common" strings in Makefiles, *.xml, to
reference the "/usr/share/fedora/doc" ${FDPDIR} so that we don't
need to bugger the RPM checksums of the files by altering them at
RPM install time.
3) Buy a beer all round.
Index: db2rpm-info
===================================================================
RCS file: /cvs/docs/docs-common/bin/db2rpm-info,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- db2rpm-info 6 Jan 2006 17:40:57 -0000 1.2
+++ db2rpm-info 19 Jan 2006 19:49:54 -0000 1.3
@@ -1,8 +1,23 @@
-#!/bin/sh
-BINDIR=`dirname $0`
+#!/bin/zsh
+ME=$(basename $0)
+BINDIR=$(dirname $0)
+USAGE="usage: ${ME} [-o ofile] document.xml"
+ofile=
+while getopts o: c
+do
+ case "${c}" in
+ o) ofile="${OPTARG}";;
+ *) echo "${USAGE}" >&2; exit 1;;
+ esac
+done
+shift $(expr ${OPTIND} - 1)
if [ $# -ne 1 ]; then
- echo "usage: `basename $0` docfile.xml" >&2
+ echo "${USAGE}" >&2
exit 1
fi
+if [ "${ofile}" ]; then
+ rm -f "${ofile}"
+ exec >"${ofile}"
+fi
xsltproc ${BINDIR}/../packaging/info2rpminfo.xsl $1 |
${BINDIR}/xmlformat -f ${BINDIR}/xmlformat-fdp.conf
More information about the Fedora-docs-commits
mailing list