summaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
authorTommy Reynolds <Tommy.Reynolds@MegaCoder.com>2006-01-19 19:49:48 +0000
committerTommy Reynolds <Tommy.Reynolds@MegaCoder.com>2006-01-19 19:49:48 +0000
commitf41084d4acba94796050d6b4939af4b213e40a11 (patch)
tree486951067db68346ccedeb1c8e84ac186e09dfa8 /bin
parent46b7eac1c5a54b23d50c94ac5094618bf0ad6ecc (diff)
downloadfedora-doc-utils-f41084d4acba94796050d6b4939af4b213e40a11.tar.gz
fedora-doc-utils-f41084d4acba94796050d6b4939af4b213e40a11.tar.xz
fedora-doc-utils-f41084d4acba94796050d6b4939af4b213e40a11.zip
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.
Diffstat (limited to 'bin')
-rwxr-xr-xbin/db2rpm-info21
1 files changed, 18 insertions, 3 deletions
diff --git a/bin/db2rpm-info b/bin/db2rpm-info
index db1ed45..162fa26 100755
--- a/bin/db2rpm-info
+++ b/bin/db2rpm-info
@@ -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