source: BLFS/xsl/process-install.xsl@ 8c2b505

ablfs-more trunk
Last change on this file since 8c2b505 was 610a5c4, checked in by Pierre Labastie <pierre.labastie@…>, 3 years ago

Have install commands use the right PATH and exit if error

Hopefully the present commit fixes those problems:

  • use sh -e instead of sh
  • set PATH to $PATH (which will expand to the PATH before entering sudo) before the install commands.
  • Property mode set to 100644
File size: 23.1 KB
RevLine 
[c048987]1<?xml version="1.0" encoding="ISO-8859-1"?>
[3930460]2<!DOCTYPE stylesheet [
[0974c32]3<!ENTITY detect-config
4 "contains(string($current-instr),'useradd') or
5 contains(string($current-instr),'groupadd') or
6 contains(string($current-instr),'usermod') or
7 contains(string($current-instr),'icon-cache') or
8 contains(string($current-instr),'desktop-database') or
9 contains(string($current-instr),'compile-schemas') or
10 contains(string($current-instr),'query-loaders') or
11 contains(string($current-instr),'pam.d') or
12 contains(string($current-instr),'/opt/rustc') or
13 contains(string($current-instr),'libQt5WebEngine') or
[426e40b]14 contains(string($current-instr),'desktop-file-edit') or
[22abf37]15 contains(string($current-instr),'.old') or
[d5413a9]16 contains(string($current-instr),'tracker-miner') or
[59a1e1a]17 contains(string($current-instr),'gtweak') or
[0974c32]18 contains(string($current-instr),'query-immodules')">
[3930460]19]>
[c048987]20
21<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
22 version="1.0">
23
[7933ed7]24 <xsl:template name="process-install">
25 <xsl:param name="instruction-tree"/>
26 <xsl:param name="want-stats"/>
27 <xsl:param name="root-seen"/>
28 <xsl:param name="install-seen"/>
29 <xsl:param name="test-seen"/>
30 <xsl:param name="doc-seen"/>
[c048987]31
[8fc6a47]32<!-- Isolate the current instruction -->
33 <xsl:variable name="current-instr" select="$instruction-tree[1]"/>
[c048987]34
35 <xsl:choose>
[0a0b609]36<!--============================================================-->
[8fc6a47]37<!-- First, if we have an empty tree, close everything and exit -->
38 <xsl:when test="not($current-instr)">
39 <xsl:if test="$install-seen">
[c048987]40 <xsl:call-template name="end-install"/>
[8fc6a47]41 </xsl:if>
42 <xsl:if test="$root-seen">
[c048987]43 <xsl:call-template name="end-root"/>
44 </xsl:if>
[8fc6a47]45 <xsl:if test="$doc-seen and not($root-seen)">
46 <xsl:call-template name="end-doc">
47 <xsl:with-param name="want-stats" select="$want-stats"/>
48 </xsl:call-template>
49 </xsl:if>
50 <xsl:if test="$test-seen">
51 <xsl:call-template name="end-test">
52 <xsl:with-param name="want-stats" select="$want-stats"/>
53 </xsl:call-template>
54 </xsl:if>
[0a0b609]55 </xsl:when><!-- end empty tree -->
56<!--============================================================-->
[8fc6a47]57 <xsl:when test="$current-instr[@role='root' and @remap='test']">
58 <xsl:if test="$install-seen">
59 <xsl:call-template name="end-install"/>
60 </xsl:if>
61 <xsl:if test="$root-seen">
[c048987]62 <xsl:call-template name="end-root"/>
63 </xsl:if>
[8fc6a47]64 <xsl:if test="$doc-seen and not($root-seen)">
65 <xsl:call-template name="end-doc">
66 <xsl:with-param name="want-stats" select="$want-stats"/>
67 </xsl:call-template>
68 </xsl:if>
69 <xsl:if test="not($test-seen)">
70 <xsl:call-template name="begin-test">
71 <xsl:with-param name="want-stats" select="$want-stats"/>
72 </xsl:call-template>
73 </xsl:if>
74 <xsl:call-template name="begin-root"/>
[0a0b609]75<!-- We first apply mode="root" templates, and save the result in a variable -->
76 <xsl:variable name="processed-instr">
77 <xsl:apply-templates select="$current-instr" mode="root"/>
78 </xsl:variable>
79<!-- We then process as a test instruction -->
80 <xsl:call-template name="process-test">
81 <xsl:with-param name="test-instr" select="$processed-instr"/>
82 <xsl:with-param name="want-stats" select="$want-stats"/>
83 </xsl:call-template>
[8fc6a47]84 <xsl:call-template name="process-install">
85 <xsl:with-param
86 name="instruction-tree"
87 select="$instruction-tree[position()>1]"/>
88 <xsl:with-param name="want-stats" select="$want-stats"/>
89 <xsl:with-param name="root-seen" select="boolean(1)"/>
90 <xsl:with-param name="install-seen" select="boolean(0)"/>
91 <xsl:with-param name="test-seen" select="boolean(1)"/>
92 <xsl:with-param name="doc-seen" select="boolean(0)"/>
93 </xsl:call-template>
[0a0b609]94 </xsl:when><!-- end role="root" and remap="test" -->
95<!--============================================================-->
[8fc6a47]96 <xsl:when test="$current-instr[@role='root' and @remap='doc']">
97 <xsl:if test="$test-seen">
98 <xsl:call-template name="end-test">
99 <xsl:with-param name="want-stats" select="$want-stats"/>
100 </xsl:call-template>
101 </xsl:if>
102 <xsl:if test="$doc-seen and not($root-seen)">
103 <xsl:call-template name="end-doc">
104 <xsl:with-param name="want-stats" select="$want-stats"/>
105 </xsl:call-template>
106 </xsl:if>
107 <xsl:if test="not($root-seen)">
[c048987]108 <xsl:call-template name="begin-root"/>
109 </xsl:if>
[8fc6a47]110 <xsl:if test="not($install-seen)">
111 <xsl:call-template name="begin-install"/>
112 </xsl:if>
[0a0b609]113<!-- We first apply mode="install" templates, and save the result in a
114 variable -->
115 <xsl:variable name="processed-instr">
116 <xsl:apply-templates select="$current-instr" mode="install"/>
117 </xsl:variable>
118<!-- Then comment it out -->
119 <xsl:call-template name="output-comment-out">
120 <xsl:with-param name="out-string" select="$processed-instr"/>
121 </xsl:call-template>
[8fc6a47]122<!-- The above template ends with a commented line, so that if end-install
123 adds a closing single quote, it will not be seen. Add a CR to prevent
124 that -->
125 <xsl:text>
126</xsl:text>
127 <xsl:call-template name="process-install">
128 <xsl:with-param
129 name="instruction-tree"
130 select="$instruction-tree[position()>1]"/>
131 <xsl:with-param name="want-stats" select="$want-stats"/>
132 <xsl:with-param name="root-seen" select="boolean(1)"/>
133 <xsl:with-param name="install-seen" select="boolean(1)"/>
134 <xsl:with-param name="test-seen" select="boolean(0)"/>
135 <xsl:with-param name="doc-seen" select="boolean(1)"/>
136 </xsl:call-template>
[0a0b609]137 </xsl:when><!-- end role="root" and remap="doc" -->
138<!--============================================================-->
[8fc6a47]139 <xsl:when test="$current-instr[@role='root']">
[0a0b609]140<!-- We have two cases, depending on the content: either a config instruction,
[3930460]141 that we do not record with porg (first case below), or a true install
[0a0b609]142 instruction (otherwise below) -->
[8fc6a47]143 <xsl:choose>
[0a0b609]144<!--____________________________________________________________ -->
[3930460]145 <xsl:when test="&detect-config;">
[8fc6a47]146 <xsl:if test="$install-seen">
147 <xsl:call-template name="end-install"/>
148 </xsl:if>
149 <xsl:if test="$test-seen">
150 <xsl:call-template name="end-test">
151 <xsl:with-param name="want-stats" select="$want-stats"/>
152 </xsl:call-template>
153 </xsl:if>
154 <xsl:if test="$doc-seen and not($root-seen)">
155 <xsl:call-template name="end-doc">
156 <xsl:with-param name="want-stats" select="$want-stats"/>
157 </xsl:call-template>
158 </xsl:if>
159 <xsl:if test="not($root-seen)">
160 <xsl:call-template name="begin-root"/>
161 </xsl:if>
162 <xsl:apply-templates select="$current-instr" mode="root"/>
163 <xsl:call-template name="process-install">
164 <xsl:with-param
165 name="instruction-tree"
166 select="$instruction-tree[position()>1]"/>
167 <xsl:with-param name="want-stats" select="$want-stats"/>
168 <xsl:with-param name="root-seen" select="boolean(1)"/>
169 <xsl:with-param name="install-seen" select="boolean(0)"/>
170 <xsl:with-param name="test-seen" select="boolean(0)"/>
171 <xsl:with-param name="doc-seen" select="boolean(0)"/>
172 </xsl:call-template>
173 </xsl:when><!-- end config as root -->
[0a0b609]174<!--____________________________________________________________ -->
[8fc6a47]175 <xsl:otherwise><!-- we have a true install instruction -->
176 <xsl:if test="$test-seen">
177 <xsl:call-template name="end-test">
178 <xsl:with-param name="want-stats" select="$want-stats"/>
179 </xsl:call-template>
180 </xsl:if>
181 <xsl:if test="$doc-seen and not($root-seen)">
182 <xsl:call-template name="end-doc">
183 <xsl:with-param name="want-stats" select="$want-stats"/>
184 </xsl:call-template>
185 </xsl:if>
186 <xsl:if test="$want-stats and not($install-seen)">
187 <xsl:if test="$root-seen">
188 <xsl:call-template name="end-root"/>
189 </xsl:if>
190 <xsl:text>
191echo Time before install: ${SECONDS} >> $INFOLOG</xsl:text>
192 <xsl:apply-templates
193 select="$instruction-tree[@role='root']/userinput"
194 mode="destdir"/>
195 <xsl:text>
196
197echo Time after install: ${SECONDS} >> $INFOLOG
[59c4761]198echo Size after install: $(sudo du -skx --exclude home $BUILD_DIR) >> $INFOLOG
[8fc6a47]199</xsl:text>
200 <xsl:if test="$root-seen">
201 <xsl:call-template name="begin-root"/>
202 </xsl:if>
203 </xsl:if>
204 <xsl:if test="not($root-seen)">
205 <xsl:call-template name="begin-root"/>
206 </xsl:if>
207 <xsl:if test="not($install-seen)">
208 <xsl:call-template name="begin-install"/>
209 </xsl:if>
210 <xsl:apply-templates select="$current-instr" mode="install"/>
211 <xsl:call-template name="process-install">
212 <xsl:with-param
213 name="instruction-tree"
214 select="$instruction-tree[position()>1]"/>
215 <xsl:with-param name="want-stats" select="$want-stats"/>
216 <xsl:with-param name="root-seen" select="boolean(1)"/>
217 <xsl:with-param name="install-seen" select="boolean(1)"/>
218 <xsl:with-param name="test-seen" select="boolean(0)"/>
219 <xsl:with-param name="doc-seen" select="boolean(0)"/>
220 </xsl:call-template>
221 </xsl:otherwise><!-- end true install instruction -->
[0a0b609]222<!--____________________________________________________________ -->
[8fc6a47]223 </xsl:choose>
224 </xsl:when><!-- role="root" and no remap -->
[0a0b609]225<!--============================================================-->
[8fc6a47]226 <xsl:when test="$current-instr[@remap='test'] or
227 $current-instr/self::command">
228 <xsl:if test="$install-seen">
[c048987]229 <xsl:call-template name="end-install"/>
230 </xsl:if>
[8fc6a47]231 <xsl:if test="$root-seen">
[c048987]232 <xsl:call-template name="end-root"/>
233 </xsl:if>
[8fc6a47]234 <xsl:if test="$doc-seen and not($root-seen)">
235 <xsl:call-template name="end-doc">
236 <xsl:with-param name="want-stats" select="$want-stats"/>
237 </xsl:call-template>
238 </xsl:if>
239 <xsl:if test="not($test-seen)">
240 <xsl:if test="not($doc-seen)">
241 <xsl:call-template name="end-make">
242 <xsl:with-param name="want-stats" select="$want-stats"/>
243 </xsl:call-template>
[c048987]244 </xsl:if>
[8fc6a47]245 <xsl:call-template name="begin-test">
246 <xsl:with-param name="want-stats" select="$want-stats"/>
247 </xsl:call-template>
[c048987]248 </xsl:if>
[0a0b609]249<!-- We first apply normal templates, and save the result in a variable -->
250 <xsl:variable name="processed-instr">
251 <xsl:apply-templates select="$current-instr"/>
252 </xsl:variable>
253<!-- We then process as a test instruction -->
254 <xsl:call-template name="process-test">
255 <xsl:with-param name="test-instr" select="$processed-instr"/>
256 <xsl:with-param name="want-stats" select="$want-stats"/>
257 </xsl:call-template>
[8fc6a47]258 <xsl:call-template name="process-install">
259 <xsl:with-param
260 name="instruction-tree"
261 select="$instruction-tree[position()>1]"/>
262 <xsl:with-param name="want-stats" select="$want-stats"/>
263 <xsl:with-param name="root-seen" select="boolean(0)"/>
264 <xsl:with-param name="install-seen" select="boolean(0)"/>
265 <xsl:with-param name="test-seen" select="boolean(1)"/>
266 <xsl:with-param name="doc-seen" select="boolean(0)"/>
267 </xsl:call-template>
[0a0b609]268 </xsl:when><!-- end no role, remap=test -->
269<!--============================================================-->
[8fc6a47]270 <xsl:when test="$current-instr[@remap='doc']">
271 <xsl:if test="$install-seen">
272 <xsl:call-template name="end-install"/>
273 </xsl:if>
274 <xsl:if test="$root-seen">
275 <xsl:call-template name="end-root"/>
276 </xsl:if>
277 <xsl:if test="$test-seen">
278 <xsl:call-template name="end-test">
279 <xsl:with-param name="want-stats" select="$want-stats"/>
280 </xsl:call-template>
281 </xsl:if>
282 <xsl:if test="not($doc-seen) or $root-seen">
283 <xsl:if test="not($test-seen) and not($root-seen)">
284 <xsl:call-template name="end-make">
285 <xsl:with-param name="want-stats" select="$want-stats"/>
286 </xsl:call-template>
[c048987]287 </xsl:if>
[8fc6a47]288 <xsl:call-template name="begin-doc">
289 <xsl:with-param name="want-stats" select="$want-stats"/>
290 </xsl:call-template>
[c048987]291 </xsl:if>
[0a0b609]292<!-- We first apply normal templates, and save the result in a variable -->
293 <xsl:variable name="processed-instr">
294 <xsl:apply-templates select="$current-instr"/>
295 </xsl:variable>
296<!-- We then process as a doc instruction -->
297 <xsl:call-template name="process-doc">
298 <xsl:with-param name="doc-instr" select="$processed-instr"/>
299 <xsl:with-param name="want-stats" select="$want-stats"/>
300 </xsl:call-template>
[8fc6a47]301 <xsl:call-template name="process-install">
302 <xsl:with-param
303 name="instruction-tree"
304 select="$instruction-tree[position()>1]"/>
305 <xsl:with-param name="want-stats" select="$want-stats"/>
306 <xsl:with-param name="root-seen" select="boolean(0)"/>
307 <xsl:with-param name="install-seen" select="boolean(0)"/>
308 <xsl:with-param name="test-seen" select="boolean(0)"/>
309 <xsl:with-param name="doc-seen" select="boolean(1)"/>
310 </xsl:call-template>
311 </xsl:when><!-- no role, remap="doc" -->
[0a0b609]312<!--============================================================-->
[8fc6a47]313 <xsl:otherwise><!-- no role no remap -->
314 <xsl:if test="$install-seen">
[c048987]315 <xsl:call-template name="end-install"/>
[8fc6a47]316 </xsl:if>
317 <xsl:if test="$root-seen">
[c048987]318 <xsl:call-template name="end-root"/>
319 </xsl:if>
[8fc6a47]320 <xsl:if test="$doc-seen and not($root-seen)">
321 <xsl:call-template name="end-doc">
322 <xsl:with-param name="want-stats" select="$want-stats"/>
323 </xsl:call-template>
324 </xsl:if>
325 <xsl:if test="$test-seen">
326 <xsl:call-template name="end-test">
327 <xsl:with-param name="want-stats" select="$want-stats"/>
328 </xsl:call-template>
329 </xsl:if>
330 <xsl:apply-templates select="$current-instr"/>
331 <xsl:call-template name="process-install">
332 <xsl:with-param
333 name="instruction-tree"
334 select="$instruction-tree[position()>1]"/>
335 <xsl:with-param name="want-stats" select="$want-stats"/>
336 <xsl:with-param name="root-seen" select="boolean(0)"/>
337 <xsl:with-param name="install-seen" select="boolean(0)"/>
338 <xsl:with-param name="test-seen" select="boolean(0)"/>
339 <xsl:with-param name="doc-seen" select="boolean(0)"/>
340 </xsl:call-template>
341 </xsl:otherwise><!-- no role, no remap -->
[0a0b609]342<!--============================================================-->
[8fc6a47]343 </xsl:choose>
344 </xsl:template>
345
[0a0b609]346 <xsl:template match="userinput" mode="install">
[8fc6a47]347 <xsl:text>
348</xsl:text>
[0a0b609]349 <xsl:call-template name="output-install">
[8fc6a47]350 <xsl:with-param name="out-string" select="string()"/>
351 </xsl:call-template>
352 </xsl:template>
353
[0a0b609]354<!-- userinput templates for mode="root" and normal are in scripts.xsl -->
[8fc6a47]355
[0a0b609]356 <xsl:template name="process-test">
357 <xsl:param name="test-instr"/>
358 <xsl:param name="want-stats"/>
359 <xsl:choose>
360 <!-- the string may begin with a linefeed -->
361 <xsl:when test="substring($test-instr,1,1)='&#xA;'">
362 <xsl:text>
[8fc6a47]363</xsl:text>
[0a0b609]364 <xsl:call-template name="process-test">
365 <xsl:with-param name="test-instr"
366 select="substring-after($test-instr,'&#xA;')"/>
367 <xsl:with-param name="want-stats" select="$want-stats"/>
368 </xsl:call-template>
369 </xsl:when>
370 <xsl:when test="contains($test-instr,'&#xA;')">
371 <xsl:call-template name="process-test">
372 <xsl:with-param name="test-instr"
373 select="substring-before($test-instr,'&#xA;')"/>
374 <xsl:with-param name="want-stats" select="$want-stats"/>
375 </xsl:call-template>
376 <xsl:text>
377</xsl:text>
378 <xsl:call-template name="process-test">
379 <xsl:with-param name="test-instr"
380 select="substring-after($test-instr,'&#xA;')"/>
381 <xsl:with-param name="want-stats" select="$want-stats"/>
382 </xsl:call-template>
383 </xsl:when>
384 <xsl:otherwise>
385 <xsl:if test="not($want-stats)">
386 <xsl:text>#</xsl:text>
387 </xsl:if>
388 <xsl:choose>
389 <xsl:when test="contains($test-instr,'make')
390 and not(contains($test-instr,'make -k'))">
391 <xsl:copy-of select="substring-before($test-instr,'make')"/>
392 <xsl:text>make -k</xsl:text>
393 <xsl:copy-of select="substring-after($test-instr,'make')"/>
394 </xsl:when>
395 <xsl:otherwise>
396 <xsl:copy-of select="$test-instr"/>
397 </xsl:otherwise>
398 </xsl:choose>
399 <xsl:if test="substring($test-instr,
400 string-length($test-instr),
401 1)!='\'">
402 <xsl:if test="$want-stats">
403 <xsl:text> &gt;&gt; $TESTLOG 2>&amp;1</xsl:text>
404 </xsl:if>
405 <xsl:text> || true</xsl:text>
406 </xsl:if>
407 </xsl:otherwise>
408 </xsl:choose>
[8fc6a47]409 </xsl:template>
410
[0a0b609]411 <xsl:template name="process-doc">
412 <xsl:param name="doc-instr"/>
413 <xsl:param name="want-stats"/>
414 <xsl:choose>
415 <xsl:when test="$want-stats">
416 <xsl:copy-of select="$doc-instr"/>
417 </xsl:when>
418 <xsl:otherwise>
419 <xsl:call-template name="output-comment-out">
420 <xsl:with-param name="out-string" select="$doc-instr"/>
421 </xsl:call-template>
422 </xsl:otherwise>
423 </xsl:choose>
[8fc6a47]424 </xsl:template>
[c048987]425
[8fc6a47]426 <xsl:template name="output-comment-out">
[0a0b609]427<!-- Output instructions with each line commented out. -->
[8fc6a47]428 <xsl:param name="out-string"/>
429 <xsl:choose>
[0a0b609]430 <!-- the string may begin with a linefeed -->
431 <xsl:when test="substring($out-string,1,1)='&#xA;'">
432 <xsl:text>
433</xsl:text>
434 <xsl:call-template name="output-comment-out">
435 <xsl:with-param name="out-string"
436 select="substring-after($out-string,'&#xA;')"/>
437 </xsl:call-template>
438 </xsl:when>
[8fc6a47]439 <xsl:when test="contains($out-string,'&#xA;')">
[0a0b609]440 <xsl:text>#</xsl:text>
441 <xsl:copy-of select="substring-before($out-string,'&#xA;')"/>
[8fc6a47]442 <xsl:text>
443</xsl:text>
444 <xsl:call-template name="output-comment-out">
[0a0b609]445 <xsl:with-param name="out-string"
446 select="substring-after($out-string,'&#xA;')"/>
[8fc6a47]447 </xsl:call-template>
448 </xsl:when>
449 <xsl:otherwise>
[0a0b609]450 <xsl:text>#</xsl:text>
451 <xsl:copy-of select="$out-string"/>
[8fc6a47]452 </xsl:otherwise>
[c048987]453 </xsl:choose>
454 </xsl:template>
455
[8fc6a47]456 <xsl:template name="end-make">
457 <xsl:param name="want-stats"/>
458 <xsl:if test="$want-stats">
459 <xsl:text>
460
461echo Time after make: ${SECONDS} >> $INFOLOG
[59c4761]462echo Size after make: $(sudo du -skx --exclude home $BUILD_DIR) >> $INFOLOG</xsl:text>
[8fc6a47]463 </xsl:if>
464 </xsl:template>
465
466 <xsl:template name="begin-doc">
467 <xsl:param name="want-stats"/>
468 <xsl:if test="$want-stats">
469 <xsl:text>
470echo Time before doc: ${SECONDS} >> $INFOLOG
471</xsl:text>
472 </xsl:if>
473 </xsl:template>
474
475 <xsl:template name="begin-test">
476 <xsl:param name="want-stats"/>
477 <xsl:if test="$want-stats">
478 <xsl:text>
479echo Time before test: ${SECONDS} >> $INFOLOG
480</xsl:text>
481 </xsl:if>
482 </xsl:template>
483
[c048987]484 <xsl:template name="begin-root">
485 <xsl:if test="$sudo='y'">
[619b313]486 <xsl:text>
[610a5c4]487sudo -E sh -e &lt;&lt; ROOT_EOF
488PATH=$PATH:/usr/sbin</xsl:text>
[c048987]489 </xsl:if>
490 </xsl:template>
491
492 <xsl:template name="begin-install">
493 <xsl:if test="$wrap-install = 'y'">
[619b313]494 <xsl:text>
495if [ -r "$JH_PACK_INSTALL" ]; then
[c048987]496 source $JH_PACK_INSTALL
497 export -f wrapInstall
498 export -f packInstall
499fi
[619b313]500wrapInstall '</xsl:text>
[c048987]501 </xsl:if>
502 </xsl:template>
503
[8fc6a47]504 <xsl:template name="end-doc">
505 <xsl:param name="want-stats"/>
506 <xsl:if test="$want-stats">
507 <xsl:text>
508
509echo Time after doc: ${SECONDS} >> $INFOLOG
[59c4761]510echo Size after doc: $(sudo du -skx --exclude home $BUILD_DIR) >> $INFOLOG</xsl:text>
[8fc6a47]511 </xsl:if>
512 </xsl:template>
513
514 <xsl:template name="end-test">
515 <xsl:param name="want-stats"/>
516 <xsl:if test="$want-stats">
517 <xsl:text>
518
519echo Time after test: ${SECONDS} >> $INFOLOG
[59c4761]520echo Size after test: $(sudo du -skx --exclude home $BUILD_DIR) >> $INFOLOG</xsl:text>
[8fc6a47]521 </xsl:if>
522 </xsl:template>
523
[c048987]524 <xsl:template name="end-root">
525 <xsl:if test="$sudo='y'">
[619b313]526 <xsl:text>
527ROOT_EOF</xsl:text>
[c048987]528 </xsl:if>
529 </xsl:template>
530
531 <xsl:template name="end-install">
532 <xsl:if test="$del-la-files = 'y'">
533 <xsl:call-template name="output-root">
534 <xsl:with-param name="out-string" select="$la-files-instr"/>
535 </xsl:call-template>
536 </xsl:if>
537 <xsl:if test="$wrap-install = 'y'">
[619b313]538 <xsl:text>'&#xA;packInstall</xsl:text>
[c048987]539 </xsl:if>
540 </xsl:template>
541
542 <xsl:template name="output-install">
543 <xsl:param name="out-string" select="''"/>
544 <xsl:choose>
[619b313]545 <xsl:when test="starts-with($out-string, 'make ') or
546 contains($out-string,' make ') or
547 contains($out-string,'&#xA;make')">
548 <xsl:call-template name="output-install">
549 <xsl:with-param
550 name="out-string"
551 select="substring-before($out-string,'make ')"/>
552 </xsl:call-template>
553 <xsl:text>make -j1 </xsl:text>
554 <xsl:call-template name="output-install">
555 <xsl:with-param
556 name="out-string"
557 select="substring-after($out-string,'make ')"/>
558 </xsl:call-template>
559 </xsl:when>
[c048987]560 <xsl:when test="contains($out-string,string($APOS))
561 and $wrap-install = 'y'">
562 <xsl:call-template name="output-root">
563 <xsl:with-param
564 name="out-string"
565 select="substring-before($out-string,string($APOS))"/>
566 </xsl:call-template>
567 <xsl:text>'\''</xsl:text>
568 <xsl:call-template name="output-install">
569 <xsl:with-param name="out-string"
570 select="substring-after($out-string,string($APOS))"/>
571 </xsl:call-template>
572 </xsl:when>
573 <xsl:otherwise>
574 <xsl:call-template name="output-root">
[aeb8539]575 <xsl:with-param name="out-string" select="$out-string"/>
[c048987]576 </xsl:call-template>
577 </xsl:otherwise>
578 </xsl:choose>
579 </xsl:template>
580
581</xsl:stylesheet>
Note: See TracBrowser for help on using the repository browser.