Changeset 619b313 for BLFS/xsl/gen-install.xsl
- Timestamp:
- 06/15/2019 03:26:23 PM (5 years ago)
- Branches:
- ablfs-more, legacy, trunk
- Children:
- cf2f109
- Parents:
- 77a8042
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
BLFS/xsl/gen-install.xsl
r77a8042 r619b313 7 7 8 8 <xsl:template match="screen" mode="installation"> 9 <xsl:param name="want-stats" select="false"/> 9 10 <!-- "nature" variables: 10 11 - 'non-root': executable as user … … 36 37 37 38 <xsl:variable 39 name="prec-screen" 40 select="preceding::screen[not(@role='nodump') and ./userinput][1] 41 [ancestor::sect2 = current()/ancestor::sect2]"/> 42 43 <xsl:variable 38 44 name="prec-string" 39 select="string( preceding-sibling::screen[not(@role='nodump') and40 ./userinput][1])"/> 45 select="string($prec-screen)"/> 46 41 47 <!-- 42 48 <xsl:message> … … 61 67 <xsl:when 62 68 test="$prec-string='' or 63 (preceding -sibling::screen[not(@role='nodump') and64 65 preceding -sibling::para/command[contains(text(),'check') or66 69 (preceding::screen[not(@role='nodump') and 70 ./userinput] | 71 preceding::command[contains(text(),'check') or 72 contains(text(),'test')] 67 73 )[last()][self::command]"> 68 74 <xsl:text>none</xsl:text> 69 75 </xsl:when> 70 <xsl:when 71 test="preceding-sibling::screen 72 [not(@role='nodump') and ./userinput][1][not(@role)]"> 76 <xsl:when test="$prec-screen[not(@role)]"> 73 77 <xsl:text>non-root</xsl:text> 74 78 </xsl:when> … … 91 95 92 96 <xsl:variable 97 name="follow-screen" 98 select="following::screen[not(@role='nodump') and ./userinput][1] 99 [ancestor::sect2 = current()/ancestor::sect2]"/> 100 101 <xsl:variable 93 102 name="follow-string" 94 select="string(following-sibling::screen[not(@role='nodump') and 95 ./userinput][1])"/> 103 select="string($follow-screen)"/> 96 104 97 105 <xsl:variable name="follow-nature"> … … 99 107 <xsl:when 100 108 test="$follow-string='' or 101 (following -sibling::screen[not(@role='nodump') and102 103 following -sibling::para/command[contains(text(),'check') or104 109 (following::screen[not(@role='nodump') and 110 ./userinput] | 111 following::command[contains(text(),'check') or 112 contains(text(),'test')] 105 113 )[1][self::command]"> 106 114 <xsl:text>none</xsl:text> 107 115 </xsl:when> 108 <xsl:when 109 test="following-sibling::screen 110 [not(@role='nodump') and ./userinput][1][not(@role)]"> 116 <xsl:when test="$follow-screen[not(@role)]"> 111 117 <xsl:text>non-root</xsl:text> 112 118 </xsl:when> … … 138 144 </xsl:if> 139 145 <xsl:apply-templates/> 140 <xsl:text>141 </xsl:text>142 146 </xsl:when> 143 147 … … 150 154 </xsl:if> 151 155 <xsl:apply-templates mode="root"/> 152 <xsl:text>153 </xsl:text>154 156 <xsl:if test="$follow-nature='none'"> 155 157 <xsl:call-template name="end-root"/> … … 159 161 <xsl:when test="$my-nature='install'"> 160 162 <xsl:if test="$prec-nature='none' or $prec-nature='non-root'"> 161 <xsl:if test="contains($list-stat-norm, 162 concat(' ',ancestor::sect1/@id,' '))"> 163 <xsl:if test="$want-stats"> 163 164 <xsl:call-template name="output-destdir"/> 164 165 </xsl:if> … … 167 168 </xsl:if> 168 169 <xsl:if test="$prec-nature='config'"> 169 <xsl:if test="contains($list-stat-norm, 170 concat(' ',ancestor::sect1/@id,' '))"> 170 <xsl:if test="$want-stats"> 171 171 <xsl:call-template name="end-root"/> 172 172 <xsl:call-template name="output-destdir"/> … … 176 176 </xsl:if> 177 177 <xsl:apply-templates mode="install"/> 178 <xsl:text>179 </xsl:text>180 178 <xsl:if test="$follow-nature='none'"> 181 179 <xsl:call-template name="end-install"/> … … 189 187 <xsl:template name="begin-root"> 190 188 <xsl:if test="$sudo='y'"> 191 <xsl:text> sudo -E sh << ROOT_EOF192 </xsl:text>189 <xsl:text> 190 sudo -E sh << ROOT_EOF</xsl:text> 193 191 </xsl:if> 194 192 </xsl:template> … … 196 194 <xsl:template name="begin-install"> 197 195 <xsl:if test="$wrap-install = 'y'"> 198 <xsl:text>if [ -r "$JH_PACK_INSTALL" ]; then 196 <xsl:text> 197 if [ -r "$JH_PACK_INSTALL" ]; then 199 198 source $JH_PACK_INSTALL 200 199 export -f wrapInstall 201 200 export -f packInstall 202 201 fi 203 wrapInstall ' 204 </xsl:text> 202 wrapInstall '</xsl:text> 205 203 </xsl:if> 206 204 </xsl:template> … … 208 206 <xsl:template name="end-root"> 209 207 <xsl:if test="$sudo='y'"> 210 <xsl:text> ROOT_EOF211 </xsl:text>208 <xsl:text> 209 ROOT_EOF</xsl:text> 212 210 </xsl:if> 213 211 </xsl:template> … … 220 218 </xsl:if> 221 219 <xsl:if test="$wrap-install = 'y'"> 222 <xsl:text>'
packInstall
</xsl:text> 223 </xsl:if> 224 </xsl:template> 225 226 <xsl:template match="text()" mode="install"> 220 <xsl:text>'
packInstall</xsl:text> 221 </xsl:if> 222 </xsl:template> 223 224 <xsl:template match="userinput" mode="install"> 225 <xsl:text> 226 </xsl:text> 227 227 <xsl:call-template name="output-install"> 228 <xsl:with-param name="out-string" select=" ."/>228 <xsl:with-param name="out-string" select="string()"/> 229 229 </xsl:call-template> 230 230 </xsl:template> … … 233 233 <xsl:param name="out-string" select="''"/> 234 234 <xsl:choose> 235 <xsl:when test="starts-with($out-string, 'make ') or 236 contains($out-string,' make ') or 237 contains($out-string,'
make')"> 238 <xsl:call-template name="output-install"> 239 <xsl:with-param 240 name="out-string" 241 select="substring-before($out-string,'make ')"/> 242 </xsl:call-template> 243 <xsl:text>make -j1 </xsl:text> 244 <xsl:call-template name="output-install"> 245 <xsl:with-param 246 name="out-string" 247 select="substring-after($out-string,'make ')"/> 248 </xsl:call-template> 249 </xsl:when> 235 250 <xsl:when test="contains($out-string,string($APOS)) 236 251 and $wrap-install = 'y'">
Note:
See TracChangeset
for help on using the changeset viewer.