summaryrefslogtreecommitdiffstats
path: root/bin/db2rpm-info
blob: 8fbb55b41477700edf1c2472e6a810f0d98bd82e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#!/bin/sh
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}" >&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