You are viewing a plain text version of this content. The canonical link for it is here.
Posted to alexandria-dev@jakarta.apache.org by ru...@apache.org on 2001/09/05 23:02:02 UTC
cvs commit: jakarta-alexandria/proposal/gump/stylesheet bash.xsl build.xsl win2k.xsl
rubys 01/09/05 14:02:02
Modified: proposal/gump/stylesheet bash.xsl build.xsl win2k.xsl
Log:
Attempt to optimize by overlapping the delete with the copy
Revision Changes Path
1.33 +24 -3 jakarta-alexandria/proposal/gump/stylesheet/bash.xsl
Index: bash.xsl
===================================================================
RCS file: /home/cvs/jakarta-alexandria/proposal/gump/stylesheet/bash.xsl,v
retrieving revision 1.32
retrieving revision 1.33
diff -u -r1.32 -r1.33
--- bash.xsl 2001/08/28 17:47:06 1.32
+++ bash.xsl 2001/09/05 21:02:02 1.33
@@ -421,9 +421,18 @@
<!-- =================================================================== -->
<xsl:template match="delete">
- <xsl:text>eval "rm -rf </xsl:text>
- <xsl:value-of select="translate(@dir,'\','/')"/>
- <xsl:text> $OUT 2>&1" </xsl:text>
+ <xsl:choose>
+ <xsl:when test="@fork='yes'">
+ <xsl:text>rm -rf </xsl:text>
+ <xsl:value-of select="translate(@dir,'\','/')"/>
+ <xsl:text>& </xsl:text>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:text>eval "rm -rf </xsl:text>
+ <xsl:value-of select="translate(@dir,'\','/')"/>
+ <xsl:text> $OUT 2>&1" </xsl:text>
+ </xsl:otherwise>
+ </xsl:choose>
</xsl:template>
<!-- =================================================================== -->
@@ -433,6 +442,18 @@
<xsl:template match="copy">
<xsl:text>cp -r </xsl:text>
<xsl:value-of select="translate(@fromdir,'\','/')"/>
+ <xsl:text> </xsl:text>
+ <xsl:value-of select="translate(@todir,'\','/')"/>
+ <xsl:text> </xsl:text>
+ </xsl:template>
+
+ <!-- =================================================================== -->
+ <!-- Move a file or directory -->
+ <!-- =================================================================== -->
+
+ <xsl:template match="move">
+ <xsl:text>move </xsl:text>
+ <xsl:value-of select="translate(@file,'\','/')"/>
<xsl:text> </xsl:text>
<xsl:value-of select="translate(@todir,'\','/')"/>
<xsl:text> </xsl:text>
1.25 +11 -6 jakarta-alexandria/proposal/gump/stylesheet/build.xsl
Index: build.xsl
===================================================================
RCS file: /home/cvs/jakarta-alexandria/proposal/gump/stylesheet/build.xsl,v
retrieving revision 1.24
retrieving revision 1.25
diff -u -r1.24 -r1.25
--- build.xsl 2001/09/03 05:52:06 1.24
+++ build.xsl 2001/09/05 21:02:02 1.25
@@ -30,12 +30,17 @@
<delete dir="build"/>
<delete dir="dist"/>
- <xsl:if test="$build-sequence = 'bulk'">
- <xsl:for-each select="module[cvs]">
- <delete dir="{@srcdir}"/>
- <copy fromdir="{$cvsdir}/{@name}" todir="{@srcdir}"/>
- </xsl:for-each>
- </xsl:if>
+ <!-- clean up old build directories -->
+ <mkdir dir="trashbin"/>
+ <xsl:for-each select="module[cvs]">
+ <move file="{@srcdir}" todir="trashbin"/>
+ </xsl:for-each>
+ <delete dir="trashbin" fork="yes"/>
+
+ <!-- initialize new build directories -->
+ <xsl:for-each select="module[cvs]">
+ <copy fromdir="{$cvsdir}/{@name}" todir="{@srcdir}"/>
+ </xsl:for-each>
<html log="{$logdir}/index.html"
banner-image="{$banner-image}" banner-link="{$banner-link}">
1.11 +27 -5 jakarta-alexandria/proposal/gump/stylesheet/win2k.xsl
Index: win2k.xsl
===================================================================
RCS file: /home/cvs/jakarta-alexandria/proposal/gump/stylesheet/win2k.xsl,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -r1.10 -r1.11
--- win2k.xsl 2001/08/28 16:15:38 1.10
+++ win2k.xsl 2001/09/05 21:02:02 1.11
@@ -369,11 +369,21 @@
<!-- =================================================================== -->
<xsl:template match="delete">
- <xsl:text>if exist </xsl:text>
- <xsl:value-of select="translate(@dir,'/','\')"/>
- <xsl:text> rmdir /s /q </xsl:text>
- <xsl:value-of select="translate(@dir,'/','\')"/>
- <xsl:text> %OUT% 2>&1 </xsl:text>
+ <xsl:choose>
+ <xsl:when test="@fork='yes'">
+ <xsl:text>start </xsl:text>
+ <xsl:text>rmdir /s /q </xsl:text>
+ <xsl:value-of select="translate(@dir,'/','\')"/>
+ <xsl:text> </xsl:text>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:text>if exist </xsl:text>
+ <xsl:value-of select="translate(@dir,'/','\')"/>
+ <xsl:text> rmdir /s /q </xsl:text>
+ <xsl:value-of select="translate(@dir,'/','\')"/>
+ <xsl:text> %OUT% 2>&1 </xsl:text>
+ </xsl:otherwise>
+ </xsl:choose>
</xsl:template>
<!-- =================================================================== -->
@@ -383,6 +393,18 @@
<xsl:template match="copy">
<xsl:text>xcopy /E /I /Q /R /K </xsl:text>
<xsl:value-of select="translate(@fromdir,'/','\')"/>
+ <xsl:text> </xsl:text>
+ <xsl:value-of select="translate(@todir,'/','\')"/>
+ <xsl:text> </xsl:text>
+ </xsl:template>
+
+ <!-- =================================================================== -->
+ <!-- Move a file or directory -->
+ <!-- =================================================================== -->
+
+ <xsl:template match="move">
+ <xsl:text>move </xsl:text>
+ <xsl:value-of select="translate(@file,'/','\')"/>
<xsl:text> </xsl:text>
<xsl:value-of select="translate(@todir,'/','\')"/>
<xsl:text> </xsl:text>
---------------------------------------------------------------------
To unsubscribe, e-mail: alexandria-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: alexandria-dev-help@jakarta.apache.org