]> git.saurik.com Git - wxWidgets.git/blobdiff - build/buildbot/config/include/testdrive-unix.xml
Add <fetch> class to allow building tarballs from the York site.
[wxWidgets.git] / build / buildbot / config / include / testdrive-unix.xml
index 7ad24c88674b51358377ea40da65148fb251acf2..38fc0592363db0de8e048157c1d68b080dc5d46a 100644 (file)
@@ -32,6 +32,36 @@ cp -pR . $BUILDDIR || { cd; rm -rf $BUILDDIR; exit 1; }
 </command>
 </xsl:template>
 
+<!--
+    unarchive - post fetch <command> run by <fetch>
+
+    Usage: <unarchive/>
+
+    The command is executed in the $HOME directory on the remote machine,
+    it is used to extract the fetched archive to the build directory.
+-->
+<xsl:template name="unarchive">
+<command>
+mkdir -p $TOPDIR
+chown $USER $TOPDIR
+rm -rf $BUILDDIR
+SOURCE=`echo $SOURCE | sed "s|^[^/]|$HOME/&amp;|"`
+cd $TOPDIR
+case $SOURCE in
+    *.tar.gz)
+        gunzip -c $SOURCE | tar xf -
+        ;;
+    *.tar.bz2)
+        bunzip2 -c $SOURCE | tar xf -
+        ;;
+    *.zip)
+        unzip $SOURCE
+        ;;
+esac
+mv wx* $BUILDDIR
+</command>
+</xsl:template>
+
 <!--
     configure - make disable-precomp-headers a default configure option for
                 the testdrive, and post process the Makefiles to use ccache.