author | Michael Krelin <hacker@klever.net> | 2011-10-13 19:25:08 (UTC) |
---|---|---|
committer | Michael Krelin <hacker@klever.net> | 2011-10-13 19:57:44 (UTC) |
commit | 398a2173290b3db2a7026dd0c1cb4d742c4c7b4a (patch) (unidiff) | |
tree | b9ca9e14f72104dcd6514e59f9eed20614eca8ed /src/xml2sh.xsl | |
parent | 7f16ae237b9f881a98719ea493ac75043336f17f (diff) | |
download | iii-398a2173290b3db2a7026dd0c1cb4d742c4c7b4a.zip iii-398a2173290b3db2a7026dd0c1cb4d742c4c7b4a.tar.gz iii-398a2173290b3db2a7026dd0c1cb4d742c4c7b4a.tar.bz2 |
moved xml2sh around
Signed-off-by: Michael Krelin <hacker@klever.net>
-rw-r--r-- | src/xml2sh.xsl | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/src/xml2sh.xsl b/src/xml2sh.xsl new file mode 100644 index 0000000..736bc21 --- a/dev/null +++ b/src/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 ></xsl:text> | ||
16 | <xsl:value-of select="translate(@MacAddress,'-','')"/> | ||
17 | <xsl:text>.conf <<__EOF__
</xsl:text> | ||
18 | <xsl:text>uploadkey="</xsl:text> | ||
19 | <xsl:value-of select="UploadKey"/> | ||
20 | <xsl:text>"
</xsl:text> | ||
21 | <xsl:text>targetdir="/var/lib/iii/%s"
</xsl:text> | ||
22 | <xsl:text>umask=022
</xsl:text> | ||
23 | <xsl:text>__EOF__
</xsl:text> | ||
24 | </xsl:template> | ||
25 | |||
26 | <xsl:template match="*|text()"/> | ||
27 | |||
28 | </xsl:stylesheet> | ||