diff options
author | Paul W. Frields <stickster@gmail.com> | 2006-01-15 23:25:31 +0000 |
---|---|---|
committer | Paul W. Frields <stickster@gmail.com> | 2006-01-15 23:25:31 +0000 |
commit | 46c2171e2619ccf61f9170fc827fb8c497a9dc44 (patch) | |
tree | c5e31d8fecdb53d0fa214fba497241fa4faa5fa6 | |
parent | 6222553af58a4f47f3000fb1564322d2f3a251fd (diff) | |
download | fedora-doc-utils-46c2171e2619ccf61f9170fc827fb8c497a9dc44.tar.gz fedora-doc-utils-46c2171e2619ccf61f9170fc827fb8c497a9dc44.tar.xz fedora-doc-utils-46c2171e2619ccf61f9170fc827fb8c497a9dc44.zip |
Add function to insert colophon entry
-rw-r--r-- | Makefile.common | 9 | ||||
-rwxr-xr-x | bin/insert-colophon | 45 |
2 files changed, 54 insertions, 0 deletions
diff --git a/Makefile.common b/Makefile.common index 3c39e06..71748d2 100644 --- a/Makefile.common +++ b/Makefile.common @@ -220,5 +220,14 @@ clog:: $(RPMINFO) # ######################################################################### +# Make a new colophon entry for an existing rpm-info.xml file. + +colophon:: $(RPMINFO) + @XMLFORMAT="$(XMLFORMAT)" XSLTPROC="$(XSLTPROC)" \ + ${FDPBIN}/insert-colophon $(RPMINFO).worker + mv -b $(RPMINFO).worker $(RPMINFO) + +# +######################################################################### # End of Makefile.common ######################################################################### diff --git a/bin/insert-colophon b/bin/insert-colophon new file mode 100755 index 0000000..d2930c2 --- /dev/null +++ b/bin/insert-colophon @@ -0,0 +1,45 @@ +#!/bin/sh +# +# insert-colophon - Add a new worker to rpm-info.xml +# + +. "$(dirname "$0")/fdp-functions" + +OUTPUT="${1:-${PWD}/rpm-info.xml.worker$$}" + +echo "Current worker list includes the following:" +get_all_workers + +while test -z "$FIRSTNAME"; do + echo -n "Enter contributor's first name: " + read FIRSTNAME +done + +echo -n "Enter contributor's middle initial/name (leave blank for NONE): " +read OTHERNAME + +while test -z "$SURNAME"; do + echo -n "Enter contributor's surname: " + read SURNAME +done + +while test -z "$INITIALS"; do + echo -n "Enter contributor's initials (or other identifier): " + read INITIALS +done + +while test -z "$EMAIL"; do + echo -n "Enter contributor's Fedora Project email: " + read EMAIL +done + +echo "You may change these values by hand if necessary in $RPMINFO" + +${XSLTPROC} --stringparam firstname "$FIRSTNAME" \ + --stringparam othername "$OTHERNAME" \ + --stringparam surname "$SURNAME" \ + --stringparam initials "$INITIALS" \ + --stringparam email "$EMAIL" \ + "${FDPPKGDIR}/insert-colophon.xsl" "$RPMINFO" | \ + ${XMLFORMAT} ${XMLFOPTS} > ${OUTPUT} +echo "New $RPMINFO written to $OUTPUT" |