- Timestamp:
- 12/12/2012 09:05:08 PM (12 years ago)
- Branches:
- ablfs
- Children:
- 12fb268
- Parents:
- c39db54
- Location:
- BLFS/xsl
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
BLFS/xsl/dependencies.xsl
rc39db54 r1061e6bc 43 43 <xsl:variable name="depname"> 44 44 <xsl:choose> 45 <xsl:when test="@name='x-window-system'">x term2</xsl:when>46 <xsl:when test="@name='xorg7'">x term2</xsl:when>45 <xsl:when test="@name='x-window-system'">xinit</xsl:when> 46 <xsl:when test="@name='xorg7'">xinit</xsl:when> 47 47 <xsl:when test="@name='server-mail'"> 48 48 <xsl:value-of select="$MTA"/> -
BLFS/xsl/scripts.xsl
rc39db54 r1061e6bc 1 <?xml version="1.0"?>1 <?xml version="1.0"?> 2 2 3 3 <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" … … 89 89 <xsl:if test="@id='xorg7-server'"> 90 90 <xsl:text>cd $SRC_DIR/MesaLib 91 UNPACKDIR=` head -n1 unpacked| sed 's@^./@@;s@/.*@@'`91 UNPACKDIR=`grep '[^./]\+' unpacked | head -n1 | sed 's@^./@@;s@/.*@@'` 92 92 rm -rf $UNPACKDIR unpacked

</xsl:text> 93 93 </xsl:if> --> … … 126 126 if [ "${PACKAGE%.zip}" = "${PACKAGE}" ]; then 127 127 if [[ -e unpacked ]] ; then 128 UNPACKDIR=` head -n1 unpacked| sed 's@^./@@;s@/.*@@'`128 UNPACKDIR=`grep '[^./]\+' unpacked | head -n1 | sed 's@^./@@;s@/.*@@'` 129 129 [[ -n $UNPACKDIR ]] && [[ -d $UNPACKDIR ]] && rm -rf $UNPACKDIR 130 130 fi 131 131 tar -xvf $PACKAGE > unpacked 132 UNPACKDIR=` head -n1 unpacked| sed 's@^./@@;s@/.*@@'`132 UNPACKDIR=`grep '[^./]\+' unpacked | head -n1 | sed 's@^./@@;s@/.*@@'` 133 133 else 134 134 UNPACKDIR=${PACKAGE%.zip} … … 151 151 <xsl:template match="sect2" mode="xorg7"> 152 152 <xsl:choose> 153 <xsl:when test="@role = 'package'">153 <!-- <xsl:when test="@role = 'package'"> 154 154 <xsl:apply-templates select="itemizedlist/listitem/para" mode="xorg7"/> 155 </xsl:when> 155 </xsl:when>--> 156 156 <xsl:when test="not(@role)"> 157 <!-- Useless <xsl:text>SRC_ARCHIVE=$SRC_ARCHIVE 158 FTP_SERVER=$FTP_SERVER
</xsl:text> --> 159 <xsl:apply-templates select=".//screen" mode="sect-ver"/> 160 <xsl:text>mkdir -p ${section}
cd ${section}
</xsl:text> 161 <xsl:apply-templates select="../sect2[@role='package']/itemizedlist/listitem/para" mode="xorg7-patch"/> 162 <xsl:text>for line in $(grep -v '^#' ../${sect_ver}.wget) ; do 163 if [[ ! -f ${line} ]] ; then 164 if [[ -f $SRC_ARCHIVE/Xorg/${section}/${line} ]] ; then 165 cp $SRC_ARCHIVE/Xorg/${section}/${line} ${line} 166 elif [[ -f $SRC_ARCHIVE/Xorg/${line} ]] ; then 167 cp $SRC_ARCHIVE/Xorg/${line} ${line} 168 elif [[ -f $SRC_ARCHIVE/${section}/${line} ]] ; then 169 cp $SRC_ARCHIVE/${section}/${line} ${line} 170 elif [[ -f $SRC_ARCHIVE/${line} ]] ; then 171 cp $SRC_ARCHIVE/${line} ${line} 172 else 173 wget -T 30 -t 5 ${FTP_X_SERVER}pub/individual/${section}/${line} || \ 174 wget -T 30 -t 5 http://xorg.freedesktop.org/releases/individual/${section}/${line} 175 fi 176 fi 177 done 178 md5sum -c ../${sect_ver}.md5 179 cp ../${sect_ver}.wget ../${sect_ver}.wget.orig 180 cp ../${sect_ver}.md5 ../${sect_ver}.md5.orig
</xsl:text> 157 <!-- This is the packages download instructions> --> 158 <xsl:apply-templates select=".//screen" mode="xorg7"/> 181 159 </xsl:when> 182 160 <xsl:when test="@role = 'installation'"> 183 <xsl:text>for package in $(grep -v '^#' ../${sect_ver}.wget) ; do 184 packagedir=$(echo $package | sed 's/.tar.bz2//') 185 tar -xf ${package} 186 cd ${packagedir}
</xsl:text> 187 <xsl:apply-templates select=".//screen | .//para/command"/> 188 <xsl:text> cd .. 189 rm -rf ${packagedir} 190 sed -i "/${package}/d" ../${sect_ver}.wget 191 sed -i "/${package}/d" ../${sect_ver}.md5 192 done 193 mv ../${sect_ver}.wget.orig ../${sect_ver}.wget 194 mv ../${sect_ver}.md5.orig ../${sect_ver}.md5
</xsl:text> 161 <xsl:apply-templates select=".//screen" mode="xorg7"/> 195 162 <xsl:if test="$sudo = 'y'"> 196 163 <xsl:text>sudo /sbin/</xsl:text> … … 199 166 </xsl:when> 200 167 <xsl:when test="@role = 'configuration'"> 168 <xsl:text>if [[ $XORG_PREFIX != /usr ]] ; then
</xsl:text> 201 169 <xsl:apply-templates select=".//screen"/> 202 <xsl:text> 
</xsl:text>170 <xsl:text>fi
</xsl:text> 203 171 </xsl:when> 204 172 </xsl:choose> … … 273 241 mode="package"/> 274 242 </xsl:when> 275 <xsl:when test=" string()='Additional Downloads'">243 <xsl:when test="contains(string(),'Additional')"> 276 244 <xsl:apply-templates 277 245 select="following-sibling::itemizedlist[1]/listitem/para" … … 452 420 </xsl:template> 453 421 422 <xsl:template match="screen" mode="xorg7"> 423 <xsl:if test="child::* = userinput and not(@role = 'nodump')"> 424 <xsl:apply-templates select="userinput" mode="xorg7"/> 425 <xsl:text>
</xsl:text> 426 </xsl:if> 427 </xsl:template> 428 454 429 <xsl:template match="screen" mode="config"> 455 430 <xsl:if test="preceding-sibling::para[1]/xref[@linkend='bootscripts']"> … … 505 480 </xsl:template> 506 481 482 <xsl:template match="userinput" mode="xorg7"> 483 <xsl:apply-templates mode="xorg7"/> 484 </xsl:template> 485 486 <xsl:template match="text()" mode="xorg7"> 487 <xsl:call-template name="output-text"> 488 <xsl:with-param name="out-string" select="string()"/> 489 </xsl:call-template> 490 </xsl:template> 491 492 <xsl:template name="output-text"> 493 <xsl:param name="out-string" select="''"/> 494 <xsl:choose> 495 <xsl:when test="contains($out-string,'bash -e')"> 496 <xsl:call-template name="output-text"> 497 <xsl:with-param name="out-string" 498 select="substring-before($out-string,'bash -e')"/> 499 </xsl:call-template> 500 <xsl:text># bash -e</xsl:text> 501 <xsl:call-template name="output-text"> 502 <xsl:with-param name="out-string" 503 select="substring-after($out-string,'bash -e')"/> 504 </xsl:call-template> 505 </xsl:when> 506 <xsl:when test="contains($out-string,'exit')"> 507 <xsl:call-template name="output-text"> 508 <xsl:with-param name="out-string" 509 select="substring-before($out-string,'exit')"/> 510 </xsl:call-template> 511 <xsl:text># exit</xsl:text> 512 <xsl:call-template name="output-text"> 513 <xsl:with-param name="out-string" 514 select="substring-after($out-string,'exit')"/> 515 </xsl:call-template> 516 </xsl:when> 517 <xsl:when test="contains($out-string,'mkdir')"> 518 <xsl:call-template name="output-text"> 519 <xsl:with-param name="out-string" 520 select="substring-before($out-string,'mkdir')"/> 521 </xsl:call-template> 522 <xsl:text>mkdir -p</xsl:text> 523 <xsl:call-template name="output-text"> 524 <xsl:with-param name="out-string" 525 select="substring-after($out-string,'mkdir')"/> 526 </xsl:call-template> 527 </xsl:when> 528 <xsl:when test="contains($out-string,'rm -r ')"> 529 <xsl:call-template name="output-text"> 530 <xsl:with-param name="out-string" 531 select="substring-before($out-string,'rm -r ')"/> 532 </xsl:call-template> 533 <xsl:text>rm -rf </xsl:text> 534 <xsl:call-template name="output-text"> 535 <xsl:with-param name="out-string" 536 select="substring-after($out-string,'rm -r ')"/> 537 </xsl:call-template> 538 </xsl:when> 539 <xsl:otherwise> 540 <xsl:value-of select="$out-string"/> 541 </xsl:otherwise> 542 </xsl:choose> 543 </xsl:template> 544 507 545 <xsl:template match="text()" mode="root"> 508 546 <xsl:call-template name="output-root">
Note:
See TracChangeset
for help on using the changeset viewer.