aboutsummaryrefslogtreecommitdiff
path: root/src/steps
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
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')
-rw-r--r--src/steps/plan.xsl3
-rw-r--r--src/steps/process.xsl16
2 files changed, 15 insertions, 4 deletions
diff --git a/src/steps/plan.xsl b/src/steps/plan.xsl
index 9ad773b..acc25ec 100644
--- a/src/steps/plan.xsl
+++ b/src/steps/plan.xsl
@@ -2,10 +2,9 @@
<xsl:stylesheet
version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
- xmlns:dyn="http://exslt.org/dynamic"
xmlns:xalan="http://xml.apache.org/xalan"
xmlns:InputXSLT="function.inputxslt.application"
- exclude-result-prefixes="dyn xalan InputXSLT"
+ exclude-result-prefixes="xalan InputXSLT"
>
<xsl:output
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">