summaryrefslogtreecommitdiffstats
path: root/bin/db2rpm-info
blob: 162fa26cc5325e3d34f72be245d2fec330955a2c (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/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}" >&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