diff options
author | Tommy Reynolds <Tommy.Reynolds@MegaCoder.com> | 2006-02-03 17:55:39 +0000 |
---|---|---|
committer | Tommy Reynolds <Tommy.Reynolds@MegaCoder.com> | 2006-02-03 17:55:39 +0000 |
commit | 0e0899afeb87dd8040b6b2c9ac4787b5ee24cf71 (patch) | |
tree | bd40f2d79f1b7d2f477459657a080cc8212b974d /bin | |
parent | c571e36c3382921a15aee9f79da3019534ab7ce4 (diff) | |
download | fedora-doc-utils-0e0899afeb87dd8040b6b2c9ac4787b5ee24cf71.tar.gz fedora-doc-utils-0e0899afeb87dd8040b6b2c9ac4787b5ee24cf71.tar.xz fedora-doc-utils-0e0899afeb87dd8040b6b2c9ac4787b5ee24cf71.zip |
1) Make "${FDPDIR}" into an absolute pathname to allow the fdpsh
cd(1) command to be useful.
2) Added the fdpsh command "prettyprint foo.xml" as a wrapper to the
current xmlformat tool. I used a different name to avoid
overloading the current name. To much trouble to parse another
"-f /path/to/config" argument ;-)
3) Borked the definition of ${RPMINFO} until we get the RPM packaging
fixed again.
Diffstat (limited to 'bin')
-rw-r--r-- | bin/fdp-functions | 20 |
1 files changed, 17 insertions, 3 deletions
diff --git a/bin/fdp-functions b/bin/fdp-functions index 222a305..8a522b9 100644 --- a/bin/fdp-functions +++ b/bin/fdp-functions @@ -6,14 +6,24 @@ FDPDIR=${FDPDIR:-".."} + +# Convert ${FDPDIR} into an absolute pathname if needed +case "${FDPDIR}" in +/* ) + ;; +* ) + FDPDIR=${PWD}/${FDPDIR} + ;; +esac + FDPBINDIR="${FDPDIR}/docs-common/bin" FDPPKGDIR="${FDPDIR}/docs-common/packaging" -RPMINFO=${RPMINFO:-"rpm-info.xml"} +# NOTE TO PAUL: This is not a happy solution to defining ${RPMINFO} +RPMINFO=${RPMINFO:-"rpm-info-${LANG}.xml"} XSLTPROC=${XSLTPROC:-xsltproc} XMLFORMAT=${XMLFORMAT:-"${FDPBINDIR}/xmlformat"} XMLFOPTS=${XMLFOPTS:-"-f ${FDPBINDIR}/xmlformat-fdp.conf"} - get_all_workers() { # Return list of workers, in format "email:wholename" @@ -89,10 +99,14 @@ apply_po() { if [ $# -ne 1 ]; then echo "usage: apply_po filename.xml">&2 fi - POFILE=`/bin/basename "$1" .xml`.po + POFILE=`/usr/bin/dirname "$1"`/`/bin/basename "$1" .xml`.po if [ ! -f "${POFILE}" ]; then echo "apply_po: file '${POFILE}' not found." >&2 return 1 fi po2xml "$1" "${POFILE}" } + +prettyprint() { + ${XMLFORMAT} ${XMLFOPTS} $@ +} |