aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGabor Kovesdan <gabor@FreeBSD.org>2014-03-07 11:37:21 +0000
committerGabor Kovesdan <gabor@FreeBSD.org>2014-03-07 11:37:21 +0000
commit42293fc0966d243f9ee8fd728425245a4f3dcf80 (patch)
treee284b9efc0d18fd20fdda2cea8d230944658ab00
parent2fb105f2e7d439a573a3fabb9f6a85d398506f97 (diff)
downloaddoc-42293fc0966d243f9ee8fd728425245a4f3dcf80.tar.gz
doc-42293fc0966d243f9ee8fd728425245a4f3dcf80.zip
- Allow generating only PGP fingerprints
Notes
Notes: svn path=/head/; revision=44165
-rw-r--r--en_US.ISO8859-1/books/handbook/Makefile7
-rw-r--r--share/xml/freebsd-pgpkeyring.xsl21
2 files changed, 23 insertions, 5 deletions
diff --git a/en_US.ISO8859-1/books/handbook/Makefile b/en_US.ISO8859-1/books/handbook/Makefile
index fa7ad27323..07a87bd934 100644
--- a/en_US.ISO8859-1/books/handbook/Makefile
+++ b/en_US.ISO8859-1/books/handbook/Makefile
@@ -288,7 +288,7 @@ XMLFLAGS+= ${CHAPTERS:S/\/chapter.xml//:S/^/-i chap./}
XMLFLAGS+= -i chap.freebsd-glossary
pgpkeyring: pgpkeys/chapter.xml ${DOC}.parsed.xml
- @${XSLTPROC} ${XSLPGP} ${DOC}.parsed.xml
+ @${XSLTPROC} ${XSLTPROCOPTS} ${XSLPGP} ${DOC}.parsed.xml
#
# Handbook-specific variables
@@ -343,3 +343,8 @@ SRCS+= mirrors.lastmod.inc \
eresources.xml.www.index.inc
.include "${DOC_PREFIX}/share/mk/doc.project.mk"
+
+# XXX
+.if defined(FINGERPRINTS_ONLY)
+XSLTPROCOPTS+=--param generate.fingerprint.only '1'
+.endif
diff --git a/share/xml/freebsd-pgpkeyring.xsl b/share/xml/freebsd-pgpkeyring.xsl
index 75ce49a172..0776f9ea08 100644
--- a/share/xml/freebsd-pgpkeyring.xsl
+++ b/share/xml/freebsd-pgpkeyring.xsl
@@ -8,10 +8,23 @@
<xsl:output method="text"/>
+ <xsl:param name="generate.fingerprint.only" select="0"/>
+
<xsl:template match="/">
- <xsl:for-each select="//db:programlisting[@role='pgpkey']">
- <xsl:value-of select="."/>
- <xsl:text>&#xA;</xsl:text>
- </xsl:for-each>
+ <xsl:choose>
+ <xsl:when test="$generate.fingerprint.only">
+ <xsl:for-each select="//db:programlisting[@role='pgpfingerprint']">
+ <xsl:value-of select="."/>
+ <xsl:text>&#xA;</xsl:text>
+ </xsl:for-each>
+ </xsl:when>
+
+ <xsl:otherwise>
+ <xsl:for-each select="//db:programlisting[@role='pgpkey' or @role='pgpfingerprint']">
+ <xsl:value-of select="."/>
+ <xsl:text>&#xA;</xsl:text>
+ </xsl:for-each>
+ </xsl:otherwise>
+ </xsl:choose>
</xsl:template>
</xsl:stylesheet>