aboutsummaryrefslogtreecommitdiff
path: root/src/steps/process.xsl
diff options
context:
space:
mode:
authorAdrian Kummerlaender2017-06-01 16:26:01 +0200
committerAdrian Kummerlaender2017-06-01 16:26:01 +0200
commit2bd57a21c6159ab69c79e52d44120ddf29b506a8 (patch)
treed5dcac4cad7ef5b41c229f11b38b9e13540480d3 /src/steps/process.xsl
parent072250e4c022f8011df14f8bf7ad79086431a779 (diff)
downloadStaticXSLT-2bd57a21c6159ab69c79e52d44120ddf29b506a8.tar
StaticXSLT-2bd57a21c6159ab69c79e52d44120ddf29b506a8.tar.gz
StaticXSLT-2bd57a21c6159ab69c79e52d44120ddf29b506a8.tar.bz2
StaticXSLT-2bd57a21c6159ab69c79e52d44120ddf29b506a8.tar.lz
StaticXSLT-2bd57a21c6159ab69c79e52d44120ddf29b506a8.tar.xz
StaticXSLT-2bd57a21c6159ab69c79e52d44120ddf29b506a8.tar.zst
StaticXSLT-2bd57a21c6159ab69c79e52d44120ddf29b506a8.zip
Adapt `clean` task to change in `InputXSLT:external-command`
i.e. replace shell specific command chaining with successive `InputXSLT:external-command` calls
Diffstat (limited to 'src/steps/process.xsl')
-rw-r--r--src/steps/process.xsl16
1 files changed, 14 insertions, 2 deletions
diff --git a/src/steps/process.xsl b/src/steps/process.xsl
index 51e810e..8bdffca 100644
--- a/src/steps/process.xsl
+++ b/src/steps/process.xsl
@@ -39,9 +39,21 @@
<xsl:template name="clean">
<xsl:param name="path"/>
- <xsl:value-of select="InputXSLT:external-command(
- concat('rm -r ./', $path, '; mkdir ./', $path)
+ <xsl:variable name="remove_status" select="InputXSLT:external-command(
+ concat('rm -r ./', $path)
+ )/self::command/@result"/>
+ <xsl:variable name="create_status" select="InputXSLT:external-command(
+ concat('mkdir ./', $path)
)/self::command/@result"/>
+
+ <xsl:choose>
+ <xsl:when test="( $remove_status = 'success' ) and ( $create_status = 'success' )">
+ <xsl:text>success</xsl:text>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:text>error</xsl:text>
+ </xsl:otherwise>
+ </xsl:choose>
</xsl:template>
<xsl:template name="generate">