Replaced the xsl:param "unpackdir" by the shell envar "$UNPACKDIR"
This commit is contained in:
parent
d419098381
commit
540e0c641a
1 changed files with 4 additions and 11 deletions
|
@ -29,21 +29,17 @@
|
||||||
<!-- Package variables -->
|
<!-- Package variables -->
|
||||||
<xsl:param name="package" select="sect1info/keywordset/keyword[@role='package']"/>
|
<xsl:param name="package" select="sect1info/keywordset/keyword[@role='package']"/>
|
||||||
<xsl:param name="ftpdir" select="sect1info/keywordset/keyword[@role='ftpdir']"/>
|
<xsl:param name="ftpdir" select="sect1info/keywordset/keyword[@role='ftpdir']"/>
|
||||||
<xsl:param name="unpackdir" select="sect1info/keywordset/keyword[@role='unpackdir']"/>
|
|
||||||
<!-- Creating dirs and files -->
|
<!-- Creating dirs and files -->
|
||||||
<exsl:document href="{$dirname}/{$filename}" method="text">
|
<exsl:document href="{$dirname}/{$filename}" method="text">
|
||||||
<xsl:text>#!/bin/sh
set -e

</xsl:text>
|
<xsl:text>#!/bin/sh
set -e

</xsl:text>
|
||||||
<xsl:apply-templates select="sect2 | screen">
|
<xsl:apply-templates select="sect2 | screen">
|
||||||
<xsl:with-param name="package" select="$package"/>
|
<xsl:with-param name="package" select="$package"/>
|
||||||
<xsl:with-param name="ftpdir" select="$ftpdir"/>
|
<xsl:with-param name="ftpdir" select="$ftpdir"/>
|
||||||
<xsl:with-param name="unpackdir" select="$unpackdir"/>
|
|
||||||
</xsl:apply-templates>
|
</xsl:apply-templates>
|
||||||
<xsl:if test="sect2[@role='package']">
|
<xsl:if test="sect2[@role='package']">
|
||||||
<xsl:text>cd ~/sources/</xsl:text>
|
<xsl:text>cd ~/sources/</xsl:text>
|
||||||
<xsl:value-of select="$ftpdir"/>
|
<xsl:value-of select="$ftpdir"/>
|
||||||
<xsl:text>
rm -rf </xsl:text>
|
<xsl:text>
rm -rf $UNPACKDIR

</xsl:text>
|
||||||
<xsl:value-of select="$unpackdir"/>
|
|
||||||
<xsl:text>

</xsl:text>
|
|
||||||
</xsl:if>
|
</xsl:if>
|
||||||
<xsl:text>exit</xsl:text>
|
<xsl:text>exit</xsl:text>
|
||||||
</exsl:document>
|
</exsl:document>
|
||||||
|
@ -53,7 +49,6 @@
|
||||||
<xsl:template match="sect2">
|
<xsl:template match="sect2">
|
||||||
<xsl:param name="package" select="foo"/>
|
<xsl:param name="package" select="foo"/>
|
||||||
<xsl:param name="ftpdir" select="foo"/>
|
<xsl:param name="ftpdir" select="foo"/>
|
||||||
<xsl:param name="unpackdir" select="foo"/>
|
|
||||||
<xsl:choose>
|
<xsl:choose>
|
||||||
<xsl:when test="@role = 'package'">
|
<xsl:when test="@role = 'package'">
|
||||||
<xsl:apply-templates select="para"/>
|
<xsl:apply-templates select="para"/>
|
||||||
|
@ -66,16 +61,15 @@
|
||||||
<xsl:apply-templates select="itemizedlist/listitem/para">
|
<xsl:apply-templates select="itemizedlist/listitem/para">
|
||||||
<xsl:with-param name="package" select="$package"/>
|
<xsl:with-param name="package" select="$package"/>
|
||||||
<xsl:with-param name="ftpdir" select="$ftpdir"/>
|
<xsl:with-param name="ftpdir" select="$ftpdir"/>
|
||||||
<xsl:with-param name="unpackdir" select="$unpackdir"/>
|
|
||||||
</xsl:apply-templates>
|
</xsl:apply-templates>
|
||||||
<xsl:text>
</xsl:text>
|
<xsl:text>
</xsl:text>
|
||||||
</xsl:when>
|
</xsl:when>
|
||||||
<xsl:when test="@role = 'installation'">
|
<xsl:when test="@role = 'installation'">
|
||||||
<xsl:text>tar -xf </xsl:text>
|
<xsl:text>tar -xf </xsl:text>
|
||||||
<xsl:value-of select="$package"/>
|
<xsl:value-of select="$package"/>
|
||||||
<xsl:text>.*
cd </xsl:text>
|
<xsl:text>.* > /tmp/unpacked
</xsl:text>
|
||||||
<xsl:value-of select="$unpackdir"/>
|
<xsl:text>UNPACKDIR=`head -n1 /tmp/unpacked | sed 's@^./@@;s@/.*@@'`
</xsl:text>
|
||||||
<xsl:text>
</xsl:text>
|
<xsl:text>cd $UNPACKDIR
</xsl:text>
|
||||||
<xsl:apply-templates select=".//screen | .//para/command"/>
|
<xsl:apply-templates select=".//screen | .//para/command"/>
|
||||||
<xsl:text>
</xsl:text>
|
<xsl:text>
</xsl:text>
|
||||||
</xsl:when>
|
</xsl:when>
|
||||||
|
@ -116,7 +110,6 @@
|
||||||
<xsl:template match="itemizedlist/listitem/para">
|
<xsl:template match="itemizedlist/listitem/para">
|
||||||
<xsl:param name="package" select="foo"/>
|
<xsl:param name="package" select="foo"/>
|
||||||
<xsl:param name="ftpdir" select="foo"/>
|
<xsl:param name="ftpdir" select="foo"/>
|
||||||
<xsl:param name="unpackdir" select="foo"/>
|
|
||||||
<xsl:choose>
|
<xsl:choose>
|
||||||
<xsl:when test="contains(string(),'HTTP')">
|
<xsl:when test="contains(string(),'HTTP')">
|
||||||
<xsl:text>wget </xsl:text>
|
<xsl:text>wget </xsl:text>
|
||||||
|
|
Reference in a new issue