summaryrefslogtreecommitdiffstats
path: root/bin/db2rpm-info
blob: efe0fd270ddfe4b3584e5bc4d877a7e94a7a052d (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/bash
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