summaryrefslogtreecommitdiffabout
path: root/scripts
authorMichael Krelin <hacker@klever.net>2009-03-08 20:09:21 (UTC)
committer Michael Krelin <hacker@klever.net>2009-03-08 20:09:21 (UTC)
commitaadaa8b5d7eda23e72dbded9d6437b40358353f3 (patch) (unidiff)
tree0bff6fdde1e2b9be02b48aaf7d03f095604718e1 /scripts
downloadiii-0.0.zip
iii-0.0.tar.gz
iii-0.0.tar.bz2
Inital commit to public repository0.0
Diffstat (limited to 'scripts') (more/less context) (ignore whitespace changes)
-rw-r--r--scripts/xml2sh.xsl28
1 files changed, 28 insertions, 0 deletions
diff --git a/scripts/xml2sh.xsl b/scripts/xml2sh.xsl
new file mode 100644
index 0000000..736bc21
--- a/dev/null
+++ b/scripts/xml2sh.xsl
@@ -0,0 +1,28 @@
1<?xml version="1.0" encoding="us-ascii"?>
2<xsl:stylesheet version="1.0"
3 xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
4 >
5 <xsl:output
6 method="text"
7 encoding="us-ascii"
8 media-type="text/plain" />
9
10 <xsl:template match="/">
11 <xsl:apply-templates select="/Config/Cards/Card"/>
12 </xsl:template>
13
14 <xsl:template match="/Config/Cards/Card">
15 <xsl:text>cat &gt;</xsl:text>
16 <xsl:value-of select="translate(@MacAddress,'-','')"/>
17 <xsl:text>.conf &lt;&lt;__EOF__&#xa;</xsl:text>
18 <xsl:text>uploadkey=&quot;</xsl:text>
19 <xsl:value-of select="UploadKey"/>
20 <xsl:text>&quot;&#xa;</xsl:text>
21 <xsl:text>targetdir=&quot;/var/lib/iii/%s&quot;&#xa;</xsl:text>
22 <xsl:text>umask=022&#xa;</xsl:text>
23 <xsl:text>__EOF__&#xa;</xsl:text>
24 </xsl:template>
25
26 <xsl:template match="*|text()"/>
27
28</xsl:stylesheet>